ManagementGroup IOperationSource <ManagementGroup> .CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); var data = ManagementGroupData.DeserializeManagementGroupData(document.RootElement); return(new ManagementGroup(_client, data)); }
/// <summary> /// Initializes a new instance of the <see cref="ManagementGroup"/> class. /// </summary> /// <param name="operations"> The operations to copy the client options from. </param> /// <param name="resource"> The ManagementGroupData to use in these operations. </param> internal ManagementGroup(ArmResource operations, ManagementGroupData resource) : base(operations, resource.Id) { _data = resource; HasData = true; _clientDiagnostics = new ClientDiagnostics(ClientOptions); _restClient = new ManagementGroupsRestOperations(_clientDiagnostics, Pipeline, ClientOptions, BaseUri); }
internal ManagementGroup(ArmClient client, ManagementGroupData data) : this(client, data.Id) { HasData = true; _data = data; }
/// <summary> /// Initializes a new instance of the <see cref="ManagementGroup"/> class. /// </summary> /// <param name="operations"> The operations to copy the client options from. </param> /// <param name="resource"> The ManagementGroupData to use in these operations. </param> internal ManagementGroup(ResourceOperations operations, ManagementGroupData resource) : base(operations, resource.Id) { Data = resource; }