ApimRootBuilderPurpose: Initializes the ApimRootBuilder with the provided arguments and sets up the initial state. This constructor is private and is used internally by the from method.
Usage:
The constructor is not called directly. Use the from method to create an instance of ApimRootBuilder.
fromPurpose: Creates an instance of ApimRootBuilder with the provided apimInfo and props.
Usage:
const rootBuilder = ApimRootBuilder.from(
{
name: 'apimServiceName',
group: { resourceGroupName: 'resourceGroup' },
},
{
// other properties excluding 'group' and 'name'
}
);
newProductPurpose: Creates a new ApimProductBuilder instance with the provided product name.
Usage:
const productBuilder = rootBuilder.newProduct('productName');
newWorkspacePurpose: Creates a new ApimWorkspaceBuilder instance with the provided workspace name.
Usage:
const workspaceBuilder = rootBuilder.newWorkspace('workspaceName');
Here is a complete example that demonstrates how to use the ApimRootBuilder class:
const rootBuilder = ApimRootBuilder.from(
{
name: 'apimServiceName',
group: { resourceGroupName: 'resourceGroup' },
},
{
// other properties excluding 'group' and 'name'
}
);
const productBuilder = rootBuilder.newProduct('productName');
const workspaceBuilder = rootBuilder.newWorkspace('workspaceName');
Purpose: Initializes the ApimRootBuilder with the provided arguments and sets up the initial state. This constructor is private and is used internally by the from method.
Usage:
The constructor is not called directly. Use the from method to create an instance of ApimRootBuilder.
fromPurpose: Creates an instance of ApimRootBuilder with the provided apimInfo and props.
Usage:
const rootBuilder = ApimRootBuilder.from(
{
name: 'apimServiceName',
group: { resourceGroupName: 'resourceGroup' },
},
{
// other properties excluding 'group' and 'name'
}
);
newProductPurpose: Creates a new ApimProductBuilder instance with the provided product name.
Usage:
const productBuilder = rootBuilder.newProduct('productName');
newWorkspacePurpose: Creates a new ApimWorkspaceBuilder instance with the provided workspace name.
Usage:
const workspaceBuilder = rootBuilder.newWorkspace('workspaceName');
Here is a complete example that demonstrates how to use the ApimRootBuilder class:
const rootBuilder = ApimRootBuilder.from(
{
name: 'apimServiceName',
group: { resourceGroupName: 'resourceGroup' },
},
{
// other properties excluding 'group' and 'name'
}
);
const productBuilder = rootBuilder.newProduct('productName');
const workspaceBuilder = rootBuilder.newWorkspace('workspaceName');
This example demonstrates how to create an ApimRootBuilder instance using the from method, and then create ApimProductBuilder and ApimWorkspaceBuilder instances using the newProduct and newWorkspace methods, respectively.