Unverified Commit 8dd03fdf authored by Harry Barber's avatar Harry Barber Committed by GitHub
Browse files

Add getter methods to OperationExtension (#1466)

* Add `OperationExtension::namespace` and `OperationExtension::operation_name`.
parent 5a5aa2f3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -73,6 +73,16 @@ impl OperationExtension {
        }
    }

    /// Returns the Smithy model namespace.
    pub fn namespace(&self) -> &'static str {
        self.namespace
    }

    /// Returns the Smithy operation name.
    pub fn operation_name(&self) -> &'static str {
        self.operation_name
    }

    /// Returns the current operation formatted as `<namespace>#<operation_name>`.
    pub fn operation(&self) -> String {
        format!("{}#{}", self.namespace, self.operation_name)