def delete(self): stub = router_peer_pb2_grpc.ComputeRouterPeerServiceStub( channel.Channel()) request = router_peer_pb2.DeleteComputeRouterPeerRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.router): request.resource.router = Primitive.to_proto(self.router) if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.interface_name): request.resource.interface_name = Primitive.to_proto( self.interface_name) if Primitive.to_proto(self.ip_address): request.resource.ip_address = Primitive.to_proto(self.ip_address) if Primitive.to_proto(self.peer_ip_address): request.resource.peer_ip_address = Primitive.to_proto( self.peer_ip_address) if Primitive.to_proto(self.peer_asn): request.resource.peer_asn = Primitive.to_proto(self.peer_asn) if Primitive.to_proto(self.advertised_route_priority): request.resource.advertised_route_priority = Primitive.to_proto( self.advertised_route_priority) if Primitive.to_proto(self.advertise_mode): request.resource.advertise_mode = Primitive.to_proto( self.advertise_mode) if Primitive.to_proto(self.advertised_groups): request.resource.advertised_groups.extend( Primitive.to_proto(self.advertised_groups)) if RouterPeerAdvertisedIPRangesArray.to_proto( self.advertised_ip_ranges): request.resource.advertised_ip_ranges.extend( RouterPeerAdvertisedIPRangesArray.to_proto( self.advertised_ip_ranges)) if Primitive.to_proto(self.region): request.resource.region = Primitive.to_proto(self.region) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteComputeRouterPeer(request)
def hcl(self): stub = route_pb2_grpc.ComputeRouteServiceStub(channel.Channel()) request = route_pb2.ComputeRouteAsHclRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.network): request.resource.network = Primitive.to_proto(self.network) if Primitive.to_proto(self.tag): request.resource.tag.extend(Primitive.to_proto(self.tag)) if Primitive.to_proto(self.dest_range): request.resource.dest_range = Primitive.to_proto(self.dest_range) if Primitive.to_proto(self.priority): request.resource.priority = Primitive.to_proto(self.priority) if Primitive.to_proto(self.next_hop_instance): request.resource.next_hop_instance = Primitive.to_proto( self.next_hop_instance) if Primitive.to_proto(self.next_hop_ip): request.resource.next_hop_ip = Primitive.to_proto(self.next_hop_ip) if Primitive.to_proto(self.next_hop_network): request.resource.next_hop_network = Primitive.to_proto( self.next_hop_network) if Primitive.to_proto(self.next_hop_gateway): request.resource.next_hop_gateway = Primitive.to_proto( self.next_hop_gateway) if Primitive.to_proto(self.next_hop_ilb): request.resource.next_hop_ilb = Primitive.to_proto( self.next_hop_ilb) if Primitive.to_proto(self.next_hop_vpn_tunnel): request.resource.next_hop_vpn_tunnel = Primitive.to_proto( self.next_hop_vpn_tunnel) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.ComputeRouteAsHcl(request) return response.hcl
def delete(self): stub = organization_pb2_grpc.ApigeeAlphaOrganizationServiceStub( channel.Channel() ) request = organization_pb2.DeleteApigeeAlphaOrganizationRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto(self.display_name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.properties): request.resource.properties = Primitive.to_proto(self.properties) if Primitive.to_proto(self.analytics_region): request.resource.analytics_region = Primitive.to_proto( self.analytics_region ) if Primitive.to_proto(self.authorized_network): request.resource.authorized_network = Primitive.to_proto( self.authorized_network ) if OrganizationRuntimeTypeEnum.to_proto(self.runtime_type): request.resource.runtime_type = OrganizationRuntimeTypeEnum.to_proto( self.runtime_type ) if OrganizationAddonsConfig.to_proto(self.addons_config): request.resource.addons_config.CopyFrom( OrganizationAddonsConfig.to_proto(self.addons_config) ) else: request.resource.ClearField("addons_config") if Primitive.to_proto(self.runtime_database_encryption_key_name): request.resource.runtime_database_encryption_key_name = Primitive.to_proto( self.runtime_database_encryption_key_name ) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteApigeeAlphaOrganization(request)
def list(self): stub = azure_cluster_pb2_grpc.GkemulticloudAzureClusterServiceStub( channel.Channel()) request = azure_cluster_pb2.ListGkemulticloudAzureClusterRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.azure_region): request.resource.azure_region = Primitive.to_proto( self.azure_region) if Primitive.to_proto(self.resource_group_id): request.resource.resource_group_id = Primitive.to_proto( self.resource_group_id) if Primitive.to_proto(self.azure_client): request.resource.azure_client = Primitive.to_proto( self.azure_client) if AzureClusterNetworking.to_proto(self.networking): request.resource.networking.CopyFrom( AzureClusterNetworking.to_proto(self.networking)) else: request.resource.ClearField("networking") if AzureClusterControlPlane.to_proto(self.control_plane): request.resource.control_plane.CopyFrom( AzureClusterControlPlane.to_proto(self.control_plane)) else: request.resource.ClearField("control_plane") if AzureClusterAuthorization.to_proto(self.authorization): request.resource.authorization.CopyFrom( AzureClusterAuthorization.to_proto(self.authorization)) else: request.resource.ClearField("authorization") if Primitive.to_proto(self.annotations): request.resource.annotations = Primitive.to_proto(self.annotations) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) return stub.ListGkemulticloudAzureCluster(request).items
def delete(self): stub = routine_pb2_grpc.BigqueryBetaRoutineServiceStub( channel.Channel()) request = routine_pb2.DeleteBigqueryBetaRoutineRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.dataset): request.resource.dataset = Primitive.to_proto(self.dataset) if RoutineRoutineTypeEnum.to_proto(self.routine_type): request.resource.routine_type = RoutineRoutineTypeEnum.to_proto( self.routine_type) if RoutineLanguageEnum.to_proto(self.language): request.resource.language = RoutineLanguageEnum.to_proto( self.language) if RoutineArgumentsArray.to_proto(self.arguments): request.resource.arguments.extend( RoutineArgumentsArray.to_proto(self.arguments)) if RoutineArgumentsDataType.to_proto(self.return_type): request.resource.return_type.CopyFrom( RoutineArgumentsDataType.to_proto(self.return_type)) else: request.resource.ClearField("return_type") if Primitive.to_proto(self.imported_libraries): request.resource.imported_libraries.extend( Primitive.to_proto(self.imported_libraries)) if Primitive.to_proto(self.definition_body): request.resource.definition_body = Primitive.to_proto( self.definition_body) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if RoutineDeterminismLevelEnum.to_proto(self.determinism_level): request.resource.determinism_level = RoutineDeterminismLevelEnum.to_proto( self.determinism_level) if Primitive.to_proto(self.strict_mode): request.resource.strict_mode = Primitive.to_proto(self.strict_mode) response = stub.DeleteBigqueryBetaRoutine(request)
def apply(self): stub = instance_pb2_grpc.ConfigcontrollerAlphaInstanceServiceStub( channel.Channel() ) request = instance_pb2.ApplyConfigcontrollerAlphaInstanceRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.labels): request.resource.labels = Primitive.to_proto(self.labels) if InstanceBundlesConfig.to_proto(self.bundles_config): request.resource.bundles_config.CopyFrom( InstanceBundlesConfig.to_proto(self.bundles_config) ) else: request.resource.ClearField("bundles_config") if Primitive.to_proto(self.use_private_endpoint): request.resource.use_private_endpoint = Primitive.to_proto( self.use_private_endpoint ) if InstanceManagementConfig.to_proto(self.management_config): request.resource.management_config.CopyFrom( InstanceManagementConfig.to_proto(self.management_config) ) else: request.resource.ClearField("management_config") if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) request.service_account_file = self.service_account_file response = stub.ApplyConfigcontrollerAlphaInstance(request) self.name = Primitive.from_proto(response.name) self.labels = Primitive.from_proto(response.labels) self.bundles_config = InstanceBundlesConfig.from_proto(response.bundles_config) self.use_private_endpoint = Primitive.from_proto(response.use_private_endpoint) self.gke_resource_link = Primitive.from_proto(response.gke_resource_link) self.state = InstanceStateEnum.from_proto(response.state) self.management_config = InstanceManagementConfig.from_proto( response.management_config ) self.project = Primitive.from_proto(response.project) self.location = Primitive.from_proto(response.location)
def apply(self): stub = trigger_pb2_grpc.EventarcTriggerServiceStub(channel.Channel()) request = trigger_pb2.ApplyEventarcTriggerRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if TriggerEventFiltersArray.to_proto(self.event_filters): request.resource.event_filters.extend( TriggerEventFiltersArray.to_proto(self.event_filters)) if Primitive.to_proto(self.service_account): request.resource.service_account = Primitive.to_proto( self.service_account) if TriggerDestination.to_proto(self.destination): request.resource.destination.CopyFrom( TriggerDestination.to_proto(self.destination)) else: request.resource.ClearField("destination") if TriggerTransport.to_proto(self.transport): request.resource.transport.CopyFrom( TriggerTransport.to_proto(self.transport)) else: request.resource.ClearField("transport") if Primitive.to_proto(self.labels): request.resource.labels = Primitive.to_proto(self.labels) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) request.service_account_file = self.service_account_file response = stub.ApplyEventarcTrigger(request) self.name = Primitive.from_proto(response.name) self.uid = Primitive.from_proto(response.uid) self.create_time = Primitive.from_proto(response.create_time) self.update_time = Primitive.from_proto(response.update_time) self.event_filters = TriggerEventFiltersArray.from_proto( response.event_filters) self.service_account = Primitive.from_proto(response.service_account) self.destination = TriggerDestination.from_proto(response.destination) self.transport = TriggerTransport.from_proto(response.transport) self.labels = Primitive.from_proto(response.labels) self.etag = Primitive.from_proto(response.etag) self.project = Primitive.from_proto(response.project) self.location = Primitive.from_proto(response.location)
def delete(self): stub = workload_identity_pool_provider_pb2_grpc.IamWorkloadIdentityPoolProviderServiceStub( channel.Channel()) request = (workload_identity_pool_provider_pb2. DeleteIamWorkloadIdentityPoolProviderRequest()) request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto( self.display_name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.disabled): request.resource.disabled = Primitive.to_proto(self.disabled) if Primitive.to_proto(self.attribute_mapping): request.resource.attribute_mapping = Primitive.to_proto( self.attribute_mapping) if Primitive.to_proto(self.attribute_condition): request.resource.attribute_condition = Primitive.to_proto( self.attribute_condition) if WorkloadIdentityPoolProviderAws.to_proto(self.aws): request.resource.aws.CopyFrom( WorkloadIdentityPoolProviderAws.to_proto(self.aws)) else: request.resource.ClearField("aws") if WorkloadIdentityPoolProviderOidc.to_proto(self.oidc): request.resource.oidc.CopyFrom( WorkloadIdentityPoolProviderOidc.to_proto(self.oidc)) else: request.resource.ClearField("oidc") if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) if Primitive.to_proto(self.workload_identity_pool): request.resource.workload_identity_pool = Primitive.to_proto( self.workload_identity_pool) response = stub.DeleteIamWorkloadIdentityPoolProvider(request)
def delete(self): stub = firewall_policy_rule_pb2_grpc.ComputeBetaFirewallPolicyRuleServiceStub( channel.Channel()) request = firewall_policy_rule_pb2.DeleteComputeBetaFirewallPolicyRuleRequest( ) request.service_account_file = self.service_account_file if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.priority): request.resource.priority = Primitive.to_proto(self.priority) if FirewallPolicyRuleMatch.to_proto(self.match): request.resource.match.CopyFrom( FirewallPolicyRuleMatch.to_proto(self.match)) else: request.resource.ClearField("match") if Primitive.to_proto(self.action): request.resource.action = Primitive.to_proto(self.action) if FirewallPolicyRuleDirectionEnum.to_proto(self.direction): request.resource.direction = FirewallPolicyRuleDirectionEnum.to_proto( self.direction) if Primitive.to_proto(self.target_resources): request.resource.target_resources.extend( Primitive.to_proto(self.target_resources)) if Primitive.to_proto(self.enable_logging): request.resource.enable_logging = Primitive.to_proto( self.enable_logging) if Primitive.to_proto(self.target_service_accounts): request.resource.target_service_accounts.extend( Primitive.to_proto(self.target_service_accounts)) if Primitive.to_proto(self.target_secure_labels): request.resource.target_secure_labels.extend( Primitive.to_proto(self.target_secure_labels)) if Primitive.to_proto(self.disabled): request.resource.disabled = Primitive.to_proto(self.disabled) if Primitive.to_proto(self.kind): request.resource.kind = Primitive.to_proto(self.kind) if Primitive.to_proto(self.firewall_policy): request.resource.firewall_policy = Primitive.to_proto( self.firewall_policy) response = stub.DeleteComputeBetaFirewallPolicyRule(request)
def delete(self): stub = service_attachment_pb2_grpc.ComputeAlphaServiceAttachmentServiceStub( channel.Channel() ) request = service_attachment_pb2.DeleteComputeAlphaServiceAttachmentRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.target_service): request.resource.target_service = Primitive.to_proto(self.target_service) if ServiceAttachmentConnectionPreferenceEnum.to_proto( self.connection_preference ): request.resource.connection_preference = ServiceAttachmentConnectionPreferenceEnum.to_proto( self.connection_preference ) if Primitive.to_proto(self.nat_subnets): request.resource.nat_subnets.extend(Primitive.to_proto(self.nat_subnets)) if Primitive.to_proto(self.enable_proxy_protocol): request.resource.enable_proxy_protocol = Primitive.to_proto( self.enable_proxy_protocol ) if Primitive.to_proto(self.consumer_reject_lists): request.resource.consumer_reject_lists.extend( Primitive.to_proto(self.consumer_reject_lists) ) if ServiceAttachmentConsumerAcceptListsArray.to_proto( self.consumer_accept_lists ): request.resource.consumer_accept_lists.extend( ServiceAttachmentConsumerAcceptListsArray.to_proto( self.consumer_accept_lists ) ) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) response = stub.DeleteComputeAlphaServiceAttachment(request)
def delete(self): stub = envgroup_pb2_grpc.ApigeeAlphaEnvgroupServiceStub( channel.Channel()) request = envgroup_pb2.DeleteApigeeAlphaEnvgroupRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.hostnames): request.resource.hostnames.extend( Primitive.to_proto(self.hostnames)) if Primitive.to_proto(self.apigee_organization): request.resource.apigee_organization = Primitive.to_proto( self.apigee_organization) response = stub.DeleteApigeeAlphaEnvgroup(request)
def delete(self): stub = database_pb2_grpc.SpannerDatabaseServiceStub(channel.Channel()) request = database_pb2.DeleteSpannerDatabaseRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.instance): request.resource.instance = Primitive.to_proto(self.instance) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.ddl): request.resource.ddl.extend(Primitive.to_proto(self.ddl)) response = stub.DeleteSpannerDatabase(request)
def delete(self): stub = release_pb2_grpc.FirebaserulesReleaseServiceStub( channel.Channel()) request = release_pb2.DeleteFirebaserulesReleaseRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.ruleset_name): request.resource.ruleset_name = Primitive.to_proto( self.ruleset_name) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteFirebaserulesRelease(request)
def delete(self): stub = folder_pb2_grpc.CloudresourcemanagerFolderServiceStub( channel.Channel()) request = folder_pb2.DeleteCloudresourcemanagerFolderRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto( self.display_name) response = stub.DeleteCloudresourcemanagerFolder(request)
def apply(self): stub = service_pb2_grpc.ServiceusageServiceServiceStub( channel.Channel()) request = service_pb2.ApplyServiceusageServiceRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if ServiceStateEnum.to_proto(self.state): request.resource.state = ServiceStateEnum.to_proto(self.state) request.service_account_file = self.service_account_file response = stub.ApplyServiceusageService(request) self.name = Primitive.from_proto(response.name) self.state = ServiceStateEnum.from_proto(response.state) self.project = Primitive.from_proto(response.project)
def apply(self): stub = managed_service_pb2_grpc.ServicemanagementManagedServiceServiceStub( channel.Channel()) request = managed_service_pb2.ApplyServicemanagementManagedServiceRequest( ) if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) request.service_account_file = self.service_account_file response = stub.ApplyServicemanagementManagedService(request) self.name = Primitive.from_proto(response.name) self.project = Primitive.from_proto(response.project)
def delete(self): stub = policy_pb2_grpc.OrgpolicyBetaPolicyServiceStub( channel.Channel()) request = policy_pb2.DeleteOrgpolicyBetaPolicyRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if PolicySpec.to_proto(self.spec): request.resource.spec.CopyFrom(PolicySpec.to_proto(self.spec)) else: request.resource.ClearField("spec") if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) response = stub.DeleteOrgpolicyBetaPolicy(request)
def delete(self): stub = node_pb2_grpc.TPUNodeServiceStub(channel.Channel()) request = node_pb2.DeleteTPUNodeRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.accelerator_type): request.resource.accelerator_type = Primitive.to_proto( self.accelerator_type ) if Primitive.to_proto(self.tensorflow_version): request.resource.tensorflow_version = Primitive.to_proto( self.tensorflow_version ) if Primitive.to_proto(self.network): request.resource.network = Primitive.to_proto(self.network) if Primitive.to_proto(self.cidr_block): request.resource.cidr_block = Primitive.to_proto(self.cidr_block) if NodeSchedulingConfig.to_proto(self.scheduling_config): request.resource.scheduling_config.CopyFrom( NodeSchedulingConfig.to_proto(self.scheduling_config) ) else: request.resource.ClearField("scheduling_config") if Primitive.to_proto(self.labels): request.resource.labels = Primitive.to_proto(self.labels) if Primitive.to_proto(self.use_service_networking): request.resource.use_service_networking = Primitive.to_proto( self.use_service_networking ) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) response = stub.DeleteTPUNode(request)
def apply(self): stub = reservation_pb2_grpc.ComputeReservationServiceStub( channel.Channel()) request = reservation_pb2.ApplyComputeReservationRequest() if Primitive.to_proto(self.id): request.resource.id = Primitive.to_proto(self.id) if Primitive.to_proto(self.zone): request.resource.zone = Primitive.to_proto(self.zone) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if ReservationSpecificReservation.to_proto(self.specific_reservation): request.resource.specific_reservation.CopyFrom( ReservationSpecificReservation.to_proto( self.specific_reservation)) else: request.resource.ClearField("specific_reservation") if Primitive.to_proto(self.commitment): request.resource.commitment = Primitive.to_proto(self.commitment) if Primitive.to_proto(self.specific_reservation_required): request.resource.specific_reservation_required = Primitive.to_proto( self.specific_reservation_required) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) request.service_account_file = self.service_account_file response = stub.ApplyComputeReservation(request) self.id = Primitive.from_proto(response.id) self.self_link = Primitive.from_proto(response.self_link) self.zone = Primitive.from_proto(response.zone) self.description = Primitive.from_proto(response.description) self.name = Primitive.from_proto(response.name) self.specific_reservation = ReservationSpecificReservation.from_proto( response.specific_reservation) self.commitment = Primitive.from_proto(response.commitment) self.specific_reservation_required = Primitive.from_proto( response.specific_reservation_required) self.status = ReservationStatusEnum.from_proto(response.status) self.project = Primitive.from_proto(response.project)
def delete(self): stub = role_pb2_grpc.IamRoleServiceStub(channel.Channel()) request = role_pb2.DeleteIamRoleRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.title): request.resource.title = Primitive.to_proto(self.title) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if RoleLocalizedValues.to_proto(self.localized_values): request.resource.localized_values.CopyFrom( RoleLocalizedValues.to_proto(self.localized_values)) else: request.resource.ClearField("localized_values") if Primitive.to_proto(self.lifecycle_phase): request.resource.lifecycle_phase = Primitive.to_proto( self.lifecycle_phase) if Primitive.to_proto(self.group_name): request.resource.group_name = Primitive.to_proto(self.group_name) if Primitive.to_proto(self.group_title): request.resource.group_title = Primitive.to_proto(self.group_title) if Primitive.to_proto(self.included_permissions): request.resource.included_permissions.extend( Primitive.to_proto(self.included_permissions)) if RoleStageEnum.to_proto(self.stage): request.resource.stage = RoleStageEnum.to_proto(self.stage) if Primitive.to_proto(self.etag): request.resource.etag = Primitive.to_proto(self.etag) if Primitive.to_proto(self.deleted): request.resource.deleted = Primitive.to_proto(self.deleted) if Primitive.to_proto(self.included_roles): request.resource.included_roles.extend( Primitive.to_proto(self.included_roles)) if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) response = stub.DeleteIamRole(request)
def delete(self): stub = group_pb2_grpc.CloudidentityAlphaGroupServiceStub( channel.Channel()) request = group_pb2.DeleteCloudidentityAlphaGroupRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if GroupGoogleappscloudidentitygroupsvxentitykey.to_proto( self.group_key): request.resource.group_key.CopyFrom( GroupGoogleappscloudidentitygroupsvxentitykey.to_proto( self.group_key)) else: request.resource.ClearField("group_key") if GroupGoogleappscloudidentitygroupsvxentitykeyArray.to_proto( self.additional_group_keys): request.resource.additional_group_keys.extend( GroupGoogleappscloudidentitygroupsvxentitykeyArray.to_proto( self.additional_group_keys)) if Primitive.to_proto(self.parent): request.resource.parent = Primitive.to_proto(self.parent) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto( self.display_name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.labels): request.resource.labels = Primitive.to_proto(self.labels) if GroupDynamicGroupMetadata.to_proto(self.dynamic_group_metadata): request.resource.dynamic_group_metadata.CopyFrom( GroupDynamicGroupMetadata.to_proto( self.dynamic_group_metadata)) else: request.resource.ClearField("dynamic_group_metadata") if GroupPosixGroupsArray.to_proto(self.posix_groups): request.resource.posix_groups.extend( GroupPosixGroupsArray.to_proto(self.posix_groups)) if GroupInitialGroupConfigEnum.to_proto(self.initial_group_config): request.resource.initial_group_config = GroupInitialGroupConfigEnum.to_proto( self.initial_group_config) response = stub.DeleteCloudidentityAlphaGroup(request)
def apply(self): stub = instance_pb2_grpc.ApigeeAlphaInstanceServiceStub( channel.Channel()) request = instance_pb2.ApplyApigeeAlphaInstanceRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) if InstancePeeringCidrRangeEnum.to_proto(self.peering_cidr_range): request.resource.peering_cidr_range = InstancePeeringCidrRangeEnum.to_proto( self.peering_cidr_range) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto( self.display_name) if Primitive.to_proto(self.disk_encryption_key_name): request.resource.disk_encryption_key_name = Primitive.to_proto( self.disk_encryption_key_name) if Primitive.to_proto(self.apigee_organization): request.resource.apigee_organization = Primitive.to_proto( self.apigee_organization) request.service_account_file = self.service_account_file response = stub.ApplyApigeeAlphaInstance(request) self.name = Primitive.from_proto(response.name) self.location = Primitive.from_proto(response.location) self.peering_cidr_range = InstancePeeringCidrRangeEnum.from_proto( response.peering_cidr_range) self.host = Primitive.from_proto(response.host) self.port = Primitive.from_proto(response.port) self.description = Primitive.from_proto(response.description) self.display_name = Primitive.from_proto(response.display_name) self.created_at = Primitive.from_proto(response.created_at) self.last_modified_at = Primitive.from_proto(response.last_modified_at) self.disk_encryption_key_name = Primitive.from_proto( response.disk_encryption_key_name) self.state = InstanceStateEnum.from_proto(response.state) self.apigee_organization = Primitive.from_proto( response.apigee_organization)
def delete(self): stub = job_pb2_grpc.CloudschedulerJobServiceStub(channel.Channel()) request = job_pb2.DeleteCloudschedulerJobRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if JobPubsubTarget.to_proto(self.pubsub_target): request.resource.pubsub_target.CopyFrom( JobPubsubTarget.to_proto(self.pubsub_target)) else: request.resource.ClearField("pubsub_target") if JobAppEngineHttpTarget.to_proto(self.app_engine_http_target): request.resource.app_engine_http_target.CopyFrom( JobAppEngineHttpTarget.to_proto(self.app_engine_http_target)) else: request.resource.ClearField("app_engine_http_target") if JobHttpTarget.to_proto(self.http_target): request.resource.http_target.CopyFrom( JobHttpTarget.to_proto(self.http_target)) else: request.resource.ClearField("http_target") if Primitive.to_proto(self.schedule): request.resource.schedule = Primitive.to_proto(self.schedule) if Primitive.to_proto(self.time_zone): request.resource.time_zone = Primitive.to_proto(self.time_zone) if JobRetryConfig.to_proto(self.retry_config): request.resource.retry_config.CopyFrom( JobRetryConfig.to_proto(self.retry_config)) else: request.resource.ClearField("retry_config") if Primitive.to_proto(self.attempt_deadline): request.resource.attempt_deadline = Primitive.to_proto( self.attempt_deadline) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) response = stub.DeleteCloudschedulerJob(request)
def delete(self): stub = metric_descriptor_pb2_grpc.MonitoringAlphaMetricDescriptorServiceStub( channel.Channel() ) request = metric_descriptor_pb2.DeleteMonitoringAlphaMetricDescriptorRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.type): request.resource.type = Primitive.to_proto(self.type) if MetricDescriptorLabelsArray.to_proto(self.labels): request.resource.labels.extend( MetricDescriptorLabelsArray.to_proto(self.labels) ) if MetricDescriptorMetricKindEnum.to_proto(self.metric_kind): request.resource.metric_kind = MetricDescriptorMetricKindEnum.to_proto( self.metric_kind ) if MetricDescriptorValueTypeEnum.to_proto(self.value_type): request.resource.value_type = MetricDescriptorValueTypeEnum.to_proto( self.value_type ) if Primitive.to_proto(self.unit): request.resource.unit = Primitive.to_proto(self.unit) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto(self.display_name) if MetricDescriptorMetadata.to_proto(self.metadata): request.resource.metadata.CopyFrom( MetricDescriptorMetadata.to_proto(self.metadata) ) else: request.resource.ClearField("metadata") if MetricDescriptorLaunchStageEnum.to_proto(self.launch_stage): request.resource.launch_stage = MetricDescriptorLaunchStageEnum.to_proto( self.launch_stage ) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteMonitoringAlphaMetricDescriptor(request)
def apply(self): stub = budget_pb2_grpc.BillingbudgetsBetaBudgetServiceStub( channel.Channel()) request = budget_pb2.ApplyBillingbudgetsBetaBudgetRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.display_name): request.resource.display_name = Primitive.to_proto( self.display_name) if BudgetBudgetFilter.to_proto(self.budget_filter): request.resource.budget_filter.CopyFrom( BudgetBudgetFilter.to_proto(self.budget_filter)) else: request.resource.ClearField("budget_filter") if BudgetAmount.to_proto(self.amount): request.resource.amount.CopyFrom(BudgetAmount.to_proto( self.amount)) else: request.resource.ClearField("amount") if BudgetThresholdRulesArray.to_proto(self.threshold_rules): request.resource.threshold_rules.extend( BudgetThresholdRulesArray.to_proto(self.threshold_rules)) if BudgetAllUpdatesRule.to_proto(self.all_updates_rule): request.resource.all_updates_rule.CopyFrom( BudgetAllUpdatesRule.to_proto(self.all_updates_rule)) else: request.resource.ClearField("all_updates_rule") if Primitive.to_proto(self.billing_account): request.resource.billing_account = Primitive.to_proto( self.billing_account) request.service_account_file = self.service_account_file response = stub.ApplyBillingbudgetsBetaBudget(request) self.name = Primitive.from_proto(response.name) self.display_name = Primitive.from_proto(response.display_name) self.budget_filter = BudgetBudgetFilter.from_proto( response.budget_filter) self.amount = BudgetAmount.from_proto(response.amount) self.threshold_rules = BudgetThresholdRulesArray.from_proto( response.threshold_rules) self.etag = Primitive.from_proto(response.etag) self.all_updates_rule = BudgetAllUpdatesRule.from_proto( response.all_updates_rule) self.billing_account = Primitive.from_proto(response.billing_account)
def delete(self): stub = packet_mirroring_pb2_grpc.ComputeAlphaPacketMirroringServiceStub( channel.Channel()) request = packet_mirroring_pb2.DeleteComputeAlphaPacketMirroringRequest( ) request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if PacketMirroringNetwork.to_proto(self.network): request.resource.network.CopyFrom( PacketMirroringNetwork.to_proto(self.network)) else: request.resource.ClearField("network") if Primitive.to_proto(self.priority): request.resource.priority = Primitive.to_proto(self.priority) if PacketMirroringCollectorIlb.to_proto(self.collector_ilb): request.resource.collector_ilb.CopyFrom( PacketMirroringCollectorIlb.to_proto(self.collector_ilb)) else: request.resource.ClearField("collector_ilb") if PacketMirroringMirroredResources.to_proto(self.mirrored_resources): request.resource.mirrored_resources.CopyFrom( PacketMirroringMirroredResources.to_proto( self.mirrored_resources)) else: request.resource.ClearField("mirrored_resources") if PacketMirroringFilter.to_proto(self.filter): request.resource.filter.CopyFrom( PacketMirroringFilter.to_proto(self.filter)) else: request.resource.ClearField("filter") if PacketMirroringEnableEnum.to_proto(self.enable): request.resource.enable = PacketMirroringEnableEnum.to_proto( self.enable) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) response = stub.DeleteComputeAlphaPacketMirroring(request)
def delete(self): stub = connector_pb2_grpc.VpcaccessBetaConnectorServiceStub( channel.Channel()) request = connector_pb2.DeleteVpcaccessBetaConnectorRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.network): request.resource.network = Primitive.to_proto(self.network) if Primitive.to_proto(self.ip_cidr_range): request.resource.ip_cidr_range = Primitive.to_proto( self.ip_cidr_range) if Primitive.to_proto(self.min_throughput): request.resource.min_throughput = Primitive.to_proto( self.min_throughput) if Primitive.to_proto(self.max_throughput): request.resource.max_throughput = Primitive.to_proto( self.max_throughput) if ConnectorSubnet.to_proto(self.subnet): request.resource.subnet.CopyFrom( ConnectorSubnet.to_proto(self.subnet)) else: request.resource.ClearField("subnet") if Primitive.to_proto(self.machine_type): request.resource.machine_type = Primitive.to_proto( self.machine_type) if Primitive.to_proto(self.min_instances): request.resource.min_instances = Primitive.to_proto( self.min_instances) if Primitive.to_proto(self.max_instances): request.resource.max_instances = Primitive.to_proto( self.max_instances) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) response = stub.DeleteVpcaccessBetaConnector(request)
def delete(self): stub = ssl_cert_pb2_grpc.SqlBetaSslCertServiceStub(channel.Channel()) request = ssl_cert_pb2.DeleteSqlBetaSslCertRequest() request.service_account_file = self.service_account_file if Primitive.to_proto(self.common_name): request.resource.common_name = Primitive.to_proto(self.common_name) if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.instance): request.resource.instance = Primitive.to_proto(self.instance) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) response = stub.DeleteSqlBetaSslCert(request)
def apply(self): stub = metrics_scope_pb2_grpc.MonitoringBetaMetricsScopeServiceStub( channel.Channel() ) request = metrics_scope_pb2.ApplyMonitoringBetaMetricsScopeRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) request.service_account_file = self.service_account_file response = stub.ApplyMonitoringBetaMetricsScope(request) self.name = Primitive.from_proto(response.name) self.create_time = Primitive.from_proto(response.create_time) self.update_time = Primitive.from_proto(response.update_time) self.monitored_projects = MetricsScopeMonitoredProjectsArray.from_proto( response.monitored_projects )
def apply(self): stub = grpc_route_pb2_grpc.NetworkservicesAlphaGrpcRouteServiceStub( channel.Channel()) request = grpc_route_pb2.ApplyNetworkservicesAlphaGrpcRouteRequest() if Primitive.to_proto(self.name): request.resource.name = Primitive.to_proto(self.name) if Primitive.to_proto(self.labels): request.resource.labels = Primitive.to_proto(self.labels) if Primitive.to_proto(self.description): request.resource.description = Primitive.to_proto(self.description) if Primitive.to_proto(self.hostnames): request.resource.hostnames.extend( Primitive.to_proto(self.hostnames)) if Primitive.to_proto(self.routers): request.resource.routers.extend(Primitive.to_proto(self.routers)) if Primitive.to_proto(self.meshes): request.resource.meshes.extend(Primitive.to_proto(self.meshes)) if Primitive.to_proto(self.gateways): request.resource.gateways.extend(Primitive.to_proto(self.gateways)) if GrpcRouteRulesArray.to_proto(self.rules): request.resource.rules.extend( GrpcRouteRulesArray.to_proto(self.rules)) if Primitive.to_proto(self.project): request.resource.project = Primitive.to_proto(self.project) if Primitive.to_proto(self.location): request.resource.location = Primitive.to_proto(self.location) request.service_account_file = self.service_account_file response = stub.ApplyNetworkservicesAlphaGrpcRoute(request) self.name = Primitive.from_proto(response.name) self.create_time = Primitive.from_proto(response.create_time) self.update_time = Primitive.from_proto(response.update_time) self.labels = Primitive.from_proto(response.labels) self.description = Primitive.from_proto(response.description) self.hostnames = Primitive.from_proto(response.hostnames) self.routers = Primitive.from_proto(response.routers) self.meshes = Primitive.from_proto(response.meshes) self.gateways = Primitive.from_proto(response.gateways) self.rules = GrpcRouteRulesArray.from_proto(response.rules) self.project = Primitive.from_proto(response.project) self.location = Primitive.from_proto(response.location)