diff --git a/api_names_out.yaml b/api_names_out.yaml index 3170808f8..728f19d85 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -6503,6 +6503,12 @@ "/appengine:v1/BasicScaling": basic_scaling "/appengine:v1/BasicScaling/idleTimeout": idle_timeout "/appengine:v1/BasicScaling/maxInstances": max_instances +"/appengine:v1/BatchUpdateIngressRulesRequest": batch_update_ingress_rules_request +"/appengine:v1/BatchUpdateIngressRulesRequest/ingressRules": ingress_rules +"/appengine:v1/BatchUpdateIngressRulesRequest/ingressRules/ingress_rule": ingress_rule +"/appengine:v1/BatchUpdateIngressRulesResponse": batch_update_ingress_rules_response +"/appengine:v1/BatchUpdateIngressRulesResponse/ingressRules": ingress_rules +"/appengine:v1/BatchUpdateIngressRulesResponse/ingressRules/ingress_rule": ingress_rule "/appengine:v1/CertificateRawData": certificate_raw_data "/appengine:v1/CertificateRawData/privateKey": private_key "/appengine:v1/CertificateRawData/publicCertificate": public_certificate @@ -6543,6 +6549,11 @@ "/appengine:v1/FileInfo/mimeType": mime_type "/appengine:v1/FileInfo/sha1Sum": sha1_sum "/appengine:v1/FileInfo/sourceUrl": source_url +"/appengine:v1/FirewallRule": firewall_rule +"/appengine:v1/FirewallRule/action": action +"/appengine:v1/FirewallRule/description": description +"/appengine:v1/FirewallRule/priority": priority +"/appengine:v1/FirewallRule/sourceRange": source_range "/appengine:v1/HealthCheck": health_check "/appengine:v1/HealthCheck/checkInterval": check_interval "/appengine:v1/HealthCheck/disableHealthCheck": disable_health_check @@ -6588,6 +6599,10 @@ "/appengine:v1/ListDomainMappingsResponse/domainMappings": domain_mappings "/appengine:v1/ListDomainMappingsResponse/domainMappings/domain_mapping": domain_mapping "/appengine:v1/ListDomainMappingsResponse/nextPageToken": next_page_token +"/appengine:v1/ListIngressRulesResponse": list_ingress_rules_response +"/appengine:v1/ListIngressRulesResponse/ingressRules": ingress_rules +"/appengine:v1/ListIngressRulesResponse/ingressRules/ingress_rule": ingress_rule +"/appengine:v1/ListIngressRulesResponse/nextPageToken": next_page_token "/appengine:v1/ListInstancesResponse": list_instances_response "/appengine:v1/ListInstancesResponse/instances": instances "/appengine:v1/ListInstancesResponse/instances/instance": instance @@ -6840,6 +6855,25 @@ "/appengine:v1/appengine.apps.domainMappings.patch/appsId": apps_id "/appengine:v1/appengine.apps.domainMappings.patch/domainMappingsId": domain_mappings_id "/appengine:v1/appengine.apps.domainMappings.patch/updateMask": update_mask +"/appengine:v1/appengine.apps.firewall.ingressRules.batchUpdate": batch_update_ingress_rules +"/appengine:v1/appengine.apps.firewall.ingressRules.batchUpdate/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.create": create_app_firewall_ingress_rule +"/appengine:v1/appengine.apps.firewall.ingressRules.create/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.delete": delete_app_firewall_ingress_rule +"/appengine:v1/appengine.apps.firewall.ingressRules.delete/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.delete/ingressRulesId": ingress_rules_id +"/appengine:v1/appengine.apps.firewall.ingressRules.get": get_app_firewall_ingress_rule +"/appengine:v1/appengine.apps.firewall.ingressRules.get/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.get/ingressRulesId": ingress_rules_id +"/appengine:v1/appengine.apps.firewall.ingressRules.list": list_app_firewall_ingress_rules +"/appengine:v1/appengine.apps.firewall.ingressRules.list/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.list/matchingAddress": matching_address +"/appengine:v1/appengine.apps.firewall.ingressRules.list/pageSize": page_size +"/appengine:v1/appengine.apps.firewall.ingressRules.list/pageToken": page_token +"/appengine:v1/appengine.apps.firewall.ingressRules.patch": patch_app_firewall_ingress_rule +"/appengine:v1/appengine.apps.firewall.ingressRules.patch/appsId": apps_id +"/appengine:v1/appengine.apps.firewall.ingressRules.patch/ingressRulesId": ingress_rules_id +"/appengine:v1/appengine.apps.firewall.ingressRules.patch/updateMask": update_mask "/appengine:v1/appengine.apps.get": get_app "/appengine:v1/appengine.apps.get/appsId": apps_id "/appengine:v1/appengine.apps.locations.get": get_app_location @@ -12390,6 +12424,332 @@ "/cloudfunctions:v1beta2/fields": fields "/cloudfunctions:v1beta2/key": key "/cloudfunctions:v1beta2/quotaUser": quota_user +"/cloudiot:v1/AuditConfig": audit_config +"/cloudiot:v1/AuditConfig/auditLogConfigs": audit_log_configs +"/cloudiot:v1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config +"/cloudiot:v1/AuditConfig/exemptedMembers": exempted_members +"/cloudiot:v1/AuditConfig/exemptedMembers/exempted_member": exempted_member +"/cloudiot:v1/AuditConfig/service": service +"/cloudiot:v1/AuditLogConfig": audit_log_config +"/cloudiot:v1/AuditLogConfig/exemptedMembers": exempted_members +"/cloudiot:v1/AuditLogConfig/exemptedMembers/exempted_member": exempted_member +"/cloudiot:v1/AuditLogConfig/logType": log_type +"/cloudiot:v1/Binding": binding +"/cloudiot:v1/Binding/condition": condition +"/cloudiot:v1/Binding/members": members +"/cloudiot:v1/Binding/members/member": member +"/cloudiot:v1/Binding/role": role +"/cloudiot:v1/Device": device +"/cloudiot:v1/Device/blocked": blocked +"/cloudiot:v1/Device/config": config +"/cloudiot:v1/Device/credentials": credentials +"/cloudiot:v1/Device/credentials/credential": credential +"/cloudiot:v1/Device/id": id +"/cloudiot:v1/Device/lastConfigAckTime": last_config_ack_time +"/cloudiot:v1/Device/lastConfigSendTime": last_config_send_time +"/cloudiot:v1/Device/lastErrorStatus": last_error_status +"/cloudiot:v1/Device/lastErrorTime": last_error_time +"/cloudiot:v1/Device/lastEventTime": last_event_time +"/cloudiot:v1/Device/lastHeartbeatTime": last_heartbeat_time +"/cloudiot:v1/Device/lastStateTime": last_state_time +"/cloudiot:v1/Device/metadata": metadata +"/cloudiot:v1/Device/metadata/metadatum": metadatum +"/cloudiot:v1/Device/name": name +"/cloudiot:v1/Device/numId": num_id +"/cloudiot:v1/Device/state": state +"/cloudiot:v1/DeviceConfig": device_config +"/cloudiot:v1/DeviceConfig/binaryData": binary_data +"/cloudiot:v1/DeviceConfig/cloudUpdateTime": cloud_update_time +"/cloudiot:v1/DeviceConfig/deviceAckTime": device_ack_time +"/cloudiot:v1/DeviceConfig/version": version +"/cloudiot:v1/DeviceCredential": device_credential +"/cloudiot:v1/DeviceCredential/expirationTime": expiration_time +"/cloudiot:v1/DeviceCredential/publicKey": public_key +"/cloudiot:v1/DeviceRegistry": device_registry +"/cloudiot:v1/DeviceRegistry/credentials": credentials +"/cloudiot:v1/DeviceRegistry/credentials/credential": credential +"/cloudiot:v1/DeviceRegistry/eventNotificationConfigs": event_notification_configs +"/cloudiot:v1/DeviceRegistry/eventNotificationConfigs/event_notification_config": event_notification_config +"/cloudiot:v1/DeviceRegistry/httpConfig": http_config +"/cloudiot:v1/DeviceRegistry/id": id +"/cloudiot:v1/DeviceRegistry/mqttConfig": mqtt_config +"/cloudiot:v1/DeviceRegistry/name": name +"/cloudiot:v1/DeviceRegistry/stateNotificationConfig": state_notification_config +"/cloudiot:v1/DeviceState": device_state +"/cloudiot:v1/DeviceState/binaryData": binary_data +"/cloudiot:v1/DeviceState/updateTime": update_time +"/cloudiot:v1/Empty": empty +"/cloudiot:v1/EventNotificationConfig": event_notification_config +"/cloudiot:v1/EventNotificationConfig/pubsubTopicName": pubsub_topic_name +"/cloudiot:v1/Expr": expr +"/cloudiot:v1/Expr/description": description +"/cloudiot:v1/Expr/expression": expression +"/cloudiot:v1/Expr/location": location +"/cloudiot:v1/Expr/title": title +"/cloudiot:v1/GetIamPolicyRequest": get_iam_policy_request +"/cloudiot:v1/HttpConfig": http_config +"/cloudiot:v1/HttpConfig/httpEnabledState": http_enabled_state +"/cloudiot:v1/ListDeviceConfigVersionsResponse": list_device_config_versions_response +"/cloudiot:v1/ListDeviceConfigVersionsResponse/deviceConfigs": device_configs +"/cloudiot:v1/ListDeviceConfigVersionsResponse/deviceConfigs/device_config": device_config +"/cloudiot:v1/ListDeviceRegistriesResponse": list_device_registries_response +"/cloudiot:v1/ListDeviceRegistriesResponse/deviceRegistries": device_registries +"/cloudiot:v1/ListDeviceRegistriesResponse/deviceRegistries/device_registry": device_registry +"/cloudiot:v1/ListDeviceRegistriesResponse/nextPageToken": next_page_token +"/cloudiot:v1/ListDeviceStatesResponse": list_device_states_response +"/cloudiot:v1/ListDeviceStatesResponse/deviceStates": device_states +"/cloudiot:v1/ListDeviceStatesResponse/deviceStates/device_state": device_state +"/cloudiot:v1/ListDevicesResponse": list_devices_response +"/cloudiot:v1/ListDevicesResponse/devices": devices +"/cloudiot:v1/ListDevicesResponse/devices/device": device +"/cloudiot:v1/ListDevicesResponse/nextPageToken": next_page_token +"/cloudiot:v1/ModifyCloudToDeviceConfigRequest": modify_cloud_to_device_config_request +"/cloudiot:v1/ModifyCloudToDeviceConfigRequest/binaryData": binary_data +"/cloudiot:v1/ModifyCloudToDeviceConfigRequest/versionToUpdate": version_to_update +"/cloudiot:v1/MqttConfig": mqtt_config +"/cloudiot:v1/MqttConfig/mqttEnabledState": mqtt_enabled_state +"/cloudiot:v1/Policy": policy +"/cloudiot:v1/Policy/auditConfigs": audit_configs +"/cloudiot:v1/Policy/auditConfigs/audit_config": audit_config +"/cloudiot:v1/Policy/bindings": bindings +"/cloudiot:v1/Policy/bindings/binding": binding +"/cloudiot:v1/Policy/etag": etag +"/cloudiot:v1/Policy/iamOwned": iam_owned +"/cloudiot:v1/Policy/version": version +"/cloudiot:v1/PublicKeyCertificate": public_key_certificate +"/cloudiot:v1/PublicKeyCertificate/certificate": certificate +"/cloudiot:v1/PublicKeyCertificate/format": format +"/cloudiot:v1/PublicKeyCertificate/x509Details": x509_details +"/cloudiot:v1/PublicKeyCredential": public_key_credential +"/cloudiot:v1/PublicKeyCredential/format": format +"/cloudiot:v1/PublicKeyCredential/key": key +"/cloudiot:v1/RegistryCredential": registry_credential +"/cloudiot:v1/RegistryCredential/publicKeyCertificate": public_key_certificate +"/cloudiot:v1/SetIamPolicyRequest": set_iam_policy_request +"/cloudiot:v1/SetIamPolicyRequest/policy": policy +"/cloudiot:v1/SetIamPolicyRequest/updateMask": update_mask +"/cloudiot:v1/StateNotificationConfig": state_notification_config +"/cloudiot:v1/StateNotificationConfig/pubsubTopicName": pubsub_topic_name +"/cloudiot:v1/Status": status +"/cloudiot:v1/Status/code": code +"/cloudiot:v1/Status/details": details +"/cloudiot:v1/Status/details/detail": detail +"/cloudiot:v1/Status/details/detail/detail": detail +"/cloudiot:v1/Status/message": message +"/cloudiot:v1/TestIamPermissionsRequest": test_iam_permissions_request +"/cloudiot:v1/TestIamPermissionsRequest/permissions": permissions +"/cloudiot:v1/TestIamPermissionsRequest/permissions/permission": permission +"/cloudiot:v1/TestIamPermissionsResponse": test_iam_permissions_response +"/cloudiot:v1/TestIamPermissionsResponse/permissions": permissions +"/cloudiot:v1/TestIamPermissionsResponse/permissions/permission": permission +"/cloudiot:v1/X509CertificateDetails": x509_certificate_details +"/cloudiot:v1/X509CertificateDetails/expiryTime": expiry_time +"/cloudiot:v1/X509CertificateDetails/issuer": issuer +"/cloudiot:v1/X509CertificateDetails/publicKeyType": public_key_type +"/cloudiot:v1/X509CertificateDetails/signatureAlgorithm": signature_algorithm +"/cloudiot:v1/X509CertificateDetails/startTime": start_time +"/cloudiot:v1/X509CertificateDetails/subject": subject +"/cloudiot:v1/cloudiot.projects.locations.registries.create": create_project_location_registry +"/cloudiot:v1/cloudiot.projects.locations.registries.create/parent": parent +"/cloudiot:v1/cloudiot.projects.locations.registries.delete": delete_project_location_registry +"/cloudiot:v1/cloudiot.projects.locations.registries.delete/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.configVersions.list": list_project_location_registry_device_config_versions +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.configVersions.list/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.configVersions.list/numVersions": num_versions +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.create": create_project_location_registry_device +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.create/parent": parent +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.delete": delete_project_location_registry_device +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.delete/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.get": get_project_location_registry_device +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.get/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list": list_project_location_registry_devices +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/deviceIds": device_ids +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/deviceNumIds": device_num_ids +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/fieldMask": field_mask +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/pageSize": page_size +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/pageToken": page_token +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.list/parent": parent +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig": modify_cloud_to_device_config +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.patch": patch_project_location_registry_device +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.patch/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.patch/updateMask": update_mask +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.states.list": list_project_location_registry_device_states +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.states.list/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.devices.states.list/numStates": num_states +"/cloudiot:v1/cloudiot.projects.locations.registries.get": get_project_location_registry +"/cloudiot:v1/cloudiot.projects.locations.registries.get/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.getIamPolicy": get_registry_iam_policy +"/cloudiot:v1/cloudiot.projects.locations.registries.getIamPolicy/resource": resource +"/cloudiot:v1/cloudiot.projects.locations.registries.list": list_project_location_registries +"/cloudiot:v1/cloudiot.projects.locations.registries.list/pageSize": page_size +"/cloudiot:v1/cloudiot.projects.locations.registries.list/pageToken": page_token +"/cloudiot:v1/cloudiot.projects.locations.registries.list/parent": parent +"/cloudiot:v1/cloudiot.projects.locations.registries.patch": patch_project_location_registry +"/cloudiot:v1/cloudiot.projects.locations.registries.patch/name": name +"/cloudiot:v1/cloudiot.projects.locations.registries.patch/updateMask": update_mask +"/cloudiot:v1/cloudiot.projects.locations.registries.setIamPolicy": set_registry_iam_policy +"/cloudiot:v1/cloudiot.projects.locations.registries.setIamPolicy/resource": resource +"/cloudiot:v1/cloudiot.projects.locations.registries.testIamPermissions": test_registry_iam_permissions +"/cloudiot:v1/cloudiot.projects.locations.registries.testIamPermissions/resource": resource +"/cloudiot:v1/fields": fields +"/cloudiot:v1/key": key +"/cloudiot:v1/quotaUser": quota_user +"/cloudiot:v1beta1/AuditConfig": audit_config +"/cloudiot:v1beta1/AuditConfig/auditLogConfigs": audit_log_configs +"/cloudiot:v1beta1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config +"/cloudiot:v1beta1/AuditConfig/exemptedMembers": exempted_members +"/cloudiot:v1beta1/AuditConfig/exemptedMembers/exempted_member": exempted_member +"/cloudiot:v1beta1/AuditConfig/service": service +"/cloudiot:v1beta1/AuditLogConfig": audit_log_config +"/cloudiot:v1beta1/AuditLogConfig/exemptedMembers": exempted_members +"/cloudiot:v1beta1/AuditLogConfig/exemptedMembers/exempted_member": exempted_member +"/cloudiot:v1beta1/AuditLogConfig/logType": log_type +"/cloudiot:v1beta1/Binding": binding +"/cloudiot:v1beta1/Binding/condition": condition +"/cloudiot:v1beta1/Binding/members": members +"/cloudiot:v1beta1/Binding/members/member": member +"/cloudiot:v1beta1/Binding/role": role +"/cloudiot:v1beta1/Device": device +"/cloudiot:v1beta1/Device/config": config +"/cloudiot:v1beta1/Device/credentials": credentials +"/cloudiot:v1beta1/Device/credentials/credential": credential +"/cloudiot:v1beta1/Device/enabledState": enabled_state +"/cloudiot:v1beta1/Device/id": id +"/cloudiot:v1beta1/Device/lastConfigAckTime": last_config_ack_time +"/cloudiot:v1beta1/Device/lastErrorStatus": last_error_status +"/cloudiot:v1beta1/Device/lastErrorTime": last_error_time +"/cloudiot:v1beta1/Device/lastEventTime": last_event_time +"/cloudiot:v1beta1/Device/lastHeartbeatTime": last_heartbeat_time +"/cloudiot:v1beta1/Device/name": name +"/cloudiot:v1beta1/Device/numId": num_id +"/cloudiot:v1beta1/DeviceConfig": device_config +"/cloudiot:v1beta1/DeviceConfig/cloudUpdateTime": cloud_update_time +"/cloudiot:v1beta1/DeviceConfig/data": data +"/cloudiot:v1beta1/DeviceConfig/deviceAckTime": device_ack_time +"/cloudiot:v1beta1/DeviceConfig/version": version +"/cloudiot:v1beta1/DeviceConfigData": device_config_data +"/cloudiot:v1beta1/DeviceConfigData/binaryData": binary_data +"/cloudiot:v1beta1/DeviceCredential": device_credential +"/cloudiot:v1beta1/DeviceCredential/expirationTime": expiration_time +"/cloudiot:v1beta1/DeviceCredential/publicKey": public_key +"/cloudiot:v1beta1/DeviceRegistry": device_registry +"/cloudiot:v1beta1/DeviceRegistry/eventNotificationConfig": event_notification_config +"/cloudiot:v1beta1/DeviceRegistry/id": id +"/cloudiot:v1beta1/DeviceRegistry/mqttConfig": mqtt_config +"/cloudiot:v1beta1/DeviceRegistry/name": name +"/cloudiot:v1beta1/Empty": empty +"/cloudiot:v1beta1/Expr": expr +"/cloudiot:v1beta1/Expr/description": description +"/cloudiot:v1beta1/Expr/expression": expression +"/cloudiot:v1beta1/Expr/location": location +"/cloudiot:v1beta1/Expr/title": title +"/cloudiot:v1beta1/GetIamPolicyRequest": get_iam_policy_request +"/cloudiot:v1beta1/HttpDeviceConfig": http_device_config +"/cloudiot:v1beta1/HttpDeviceConfig/binaryData": binary_data +"/cloudiot:v1beta1/HttpDeviceConfig/version": version +"/cloudiot:v1beta1/HttpDeviceState": http_device_state +"/cloudiot:v1beta1/HttpDeviceState/binaryData": binary_data +"/cloudiot:v1beta1/HttpPublishEventRequest": http_publish_event_request +"/cloudiot:v1beta1/HttpPublishEventRequest/binaryData": binary_data +"/cloudiot:v1beta1/HttpPublishEventRequest/subFolder": sub_folder +"/cloudiot:v1beta1/HttpPublishEventResponse": http_publish_event_response +"/cloudiot:v1beta1/HttpSetDeviceStateRequest": http_set_device_state_request +"/cloudiot:v1beta1/HttpSetDeviceStateRequest/state": state +"/cloudiot:v1beta1/ListDeviceConfigVersionsResponse": list_device_config_versions_response +"/cloudiot:v1beta1/ListDeviceConfigVersionsResponse/deviceConfigs": device_configs +"/cloudiot:v1beta1/ListDeviceConfigVersionsResponse/deviceConfigs/device_config": device_config +"/cloudiot:v1beta1/ListDeviceRegistriesResponse": list_device_registries_response +"/cloudiot:v1beta1/ListDeviceRegistriesResponse/deviceRegistries": device_registries +"/cloudiot:v1beta1/ListDeviceRegistriesResponse/deviceRegistries/device_registry": device_registry +"/cloudiot:v1beta1/ListDeviceRegistriesResponse/nextPageToken": next_page_token +"/cloudiot:v1beta1/ListDevicesResponse": list_devices_response +"/cloudiot:v1beta1/ListDevicesResponse/devices": devices +"/cloudiot:v1beta1/ListDevicesResponse/devices/device": device +"/cloudiot:v1beta1/ListDevicesResponse/nextPageToken": next_page_token +"/cloudiot:v1beta1/ModifyCloudToDeviceConfigRequest": modify_cloud_to_device_config_request +"/cloudiot:v1beta1/ModifyCloudToDeviceConfigRequest/data": data +"/cloudiot:v1beta1/ModifyCloudToDeviceConfigRequest/versionToUpdate": version_to_update +"/cloudiot:v1beta1/MqttConfig": mqtt_config +"/cloudiot:v1beta1/MqttConfig/mqttConfigState": mqtt_config_state +"/cloudiot:v1beta1/NotificationConfig": notification_config +"/cloudiot:v1beta1/NotificationConfig/pubsubTopicName": pubsub_topic_name +"/cloudiot:v1beta1/Policy": policy +"/cloudiot:v1beta1/Policy/auditConfigs": audit_configs +"/cloudiot:v1beta1/Policy/auditConfigs/audit_config": audit_config +"/cloudiot:v1beta1/Policy/bindings": bindings +"/cloudiot:v1beta1/Policy/bindings/binding": binding +"/cloudiot:v1beta1/Policy/etag": etag +"/cloudiot:v1beta1/Policy/iamOwned": iam_owned +"/cloudiot:v1beta1/Policy/version": version +"/cloudiot:v1beta1/PublicKeyCredential": public_key_credential +"/cloudiot:v1beta1/PublicKeyCredential/format": format +"/cloudiot:v1beta1/PublicKeyCredential/key": key +"/cloudiot:v1beta1/SetIamPolicyRequest": set_iam_policy_request +"/cloudiot:v1beta1/SetIamPolicyRequest/policy": policy +"/cloudiot:v1beta1/SetIamPolicyRequest/updateMask": update_mask +"/cloudiot:v1beta1/Status": status +"/cloudiot:v1beta1/Status/code": code +"/cloudiot:v1beta1/Status/details": details +"/cloudiot:v1beta1/Status/details/detail": detail +"/cloudiot:v1beta1/Status/details/detail/detail": detail +"/cloudiot:v1beta1/Status/message": message +"/cloudiot:v1beta1/TestIamPermissionsRequest": test_iam_permissions_request +"/cloudiot:v1beta1/TestIamPermissionsRequest/permissions": permissions +"/cloudiot:v1beta1/TestIamPermissionsRequest/permissions/permission": permission +"/cloudiot:v1beta1/TestIamPermissionsResponse": test_iam_permissions_response +"/cloudiot:v1beta1/TestIamPermissionsResponse/permissions": permissions +"/cloudiot:v1beta1/TestIamPermissionsResponse/permissions/permission": permission +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.create": create_project_location_registry +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.create/parent": parent +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.delete": delete_project_location_registry +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.delete/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.configVersions.list": list_project_location_registry_device_config_versions +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.configVersions.list/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.configVersions.list/numVersions": num_versions +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.create": create_project_location_registry_device +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.create/parent": parent +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.delete": delete_project_location_registry_device +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.delete/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.get": get_project_location_registry_device +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.get/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.getConfig": get_project_location_registry_device_config +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.getConfig/localVersion": local_version +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.getConfig/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list": list_project_location_registry_devices +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/deviceIds": device_ids +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/deviceNumIds": device_num_ids +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/fieldMask": field_mask +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/pageSize": page_size +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/pageToken": page_token +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.list/parent": parent +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig": modify_cloud_to_device_config +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.patch": patch_project_location_registry_device +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.patch/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.patch/updateMask": update_mask +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.publishEvent": publish_project_location_registry_device_event +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.publishEvent/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.setState": set_project_location_registry_device_state +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.devices.setState/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.get": get_project_location_registry +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.get/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.getIamPolicy": get_registry_iam_policy +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.getIamPolicy/resource": resource +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.list": list_project_location_registries +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.list/pageSize": page_size +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.list/pageToken": page_token +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.list/parent": parent +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.patch": patch_project_location_registry +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.patch/name": name +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.patch/updateMask": update_mask +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.setIamPolicy": set_registry_iam_policy +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.setIamPolicy/resource": resource +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.testIamPermissions": test_registry_iam_permissions +"/cloudiot:v1beta1/cloudiot.projects.locations.registries.testIamPermissions/resource": resource +"/cloudiot:v1beta1/fields": fields +"/cloudiot:v1beta1/key": key +"/cloudiot:v1beta1/quotaUser": quota_user "/cloudkms:v1/AuditConfig": audit_config "/cloudkms:v1/AuditConfig/auditLogConfigs": audit_log_configs "/cloudkms:v1/AuditConfig/auditLogConfigs/audit_log_config": audit_log_config @@ -26868,6 +27228,7 @@ "/container:v1/AddonsConfig/horizontalPodAutoscaling": horizontal_pod_autoscaling "/container:v1/AddonsConfig/httpLoadBalancing": http_load_balancing "/container:v1/AddonsConfig/kubernetesDashboard": kubernetes_dashboard +"/container:v1/AddonsConfig/networkPolicyConfig": network_policy_config "/container:v1/AutoUpgradeOptions": auto_upgrade_options "/container:v1/AutoUpgradeOptions/autoUpgradeStartTime": auto_upgrade_start_time "/container:v1/AutoUpgradeOptions/description": description @@ -26988,6 +27349,8 @@ "/container:v1/NetworkPolicy": network_policy "/container:v1/NetworkPolicy/enabled": enabled "/container:v1/NetworkPolicy/provider": provider +"/container:v1/NetworkPolicyConfig": network_policy_config +"/container:v1/NetworkPolicyConfig/disabled": disabled "/container:v1/NodeConfig": node_config "/container:v1/NodeConfig/accelerators": accelerators "/container:v1/NodeConfig/accelerators/accelerator": accelerator @@ -27219,6 +27582,7 @@ "/container:v1beta1/AddonsConfig/horizontalPodAutoscaling": horizontal_pod_autoscaling "/container:v1beta1/AddonsConfig/httpLoadBalancing": http_load_balancing "/container:v1beta1/AddonsConfig/kubernetesDashboard": kubernetes_dashboard +"/container:v1beta1/AddonsConfig/networkPolicyConfig": network_policy_config "/container:v1beta1/AutoUpgradeOptions": auto_upgrade_options "/container:v1beta1/AutoUpgradeOptions/autoUpgradeStartTime": auto_upgrade_start_time "/container:v1beta1/AutoUpgradeOptions/description": description @@ -27349,6 +27713,8 @@ "/container:v1beta1/NetworkPolicy": network_policy "/container:v1beta1/NetworkPolicy/enabled": enabled "/container:v1beta1/NetworkPolicy/provider": provider +"/container:v1beta1/NetworkPolicyConfig": network_policy_config +"/container:v1beta1/NetworkPolicyConfig/disabled": disabled "/container:v1beta1/NodeConfig": node_config "/container:v1beta1/NodeConfig/accelerators": accelerators "/container:v1beta1/NodeConfig/accelerators/accelerator": accelerator diff --git a/generated/google/apis/analytics_v3/service.rb b/generated/google/apis/analytics_v3/service.rb index a2b87aa80..547619e57 100644 --- a/generated/google/apis/analytics_v3/service.rb +++ b/generated/google/apis/analytics_v3/service.rb @@ -50,7 +50,7 @@ module Google def initialize super('https://www.googleapis.com/', 'analytics/v3/') - @batch_path = 'batch/analytics/v3' + @batch_path = 'batch' end # Returns Analytics data for a view (profile). diff --git a/generated/google/apis/appengine_v1.rb b/generated/google/apis/appengine_v1.rb index 03e7cae73..35fbf02b7 100644 --- a/generated/google/apis/appengine_v1.rb +++ b/generated/google/apis/appengine_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1 VERSION = 'V1' - REVISION = '20170901' + REVISION = '20170926' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1/classes.rb b/generated/google/apis/appengine_v1/classes.rb index ba450c416..8c0b9f748 100644 --- a/generated/google/apis/appengine_v1/classes.rb +++ b/generated/google/apis/appengine_v1/classes.rb @@ -420,6 +420,44 @@ module Google end end + # Request message for Firewall.BatchUpdateIngressRules. + class BatchUpdateIngressRulesRequest + include Google::Apis::Core::Hashable + + # A list of FirewallRules to replace the existing set. + # Corresponds to the JSON property `ingressRules` + # @return [Array] + attr_accessor :ingress_rules + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ingress_rules = args[:ingress_rules] if args.key?(:ingress_rules) + end + end + + # Response message for Firewall.UpdateAllIngressRules. + class BatchUpdateIngressRulesResponse + include Google::Apis::Core::Hashable + + # The full list of ingress FirewallRules for this application. + # Corresponds to the JSON property `ingressRules` + # @return [Array] + attr_accessor :ingress_rules + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ingress_rules = args[:ingress_rules] if args.key?(:ingress_rules) + end + end + # An SSL certificate obtained from a certificate authority. class CertificateRawData include Google::Apis::Core::Hashable @@ -772,6 +810,54 @@ module Google end end + # A single firewall rule that is evaluated against incoming traffic and provides + # an action to take on matched requests. + class FirewallRule + include Google::Apis::Core::Hashable + + # The action to take on matched requests. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # An optional string description of this rule. This field has a maximum length + # of 100 characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A positive integer between 1, Int32.MaxValue-1 that defines the order of rule + # evaluation. Rules with the lowest priority are evaluated first.A default rule + # at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous + # rule matches. Only the action of this rule can be modified by the user. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + + # IP address or range, defined using CIDR notation, of requests that this rule + # applies to. You can use the wildcard character "*" to match all IPs equivalent + # to "0/0" and "::/0" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001: + # db8::/32 or 2001:0db8:0000:0042:0000:8a2e:0370:7334.

Truncation will be + # silently performed on addresses which are not properly truncated. For example, + # 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, + # 2001:db8::1/32 is accepted as the same address as 2001:db8::/32. + # Corresponds to the JSON property `sourceRange` + # @return [String] + attr_accessor :source_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @action = args[:action] if args.key?(:action) + @description = args[:description] if args.key?(:description) + @priority = args[:priority] if args.key?(:priority) + @source_range = args[:source_range] if args.key?(:source_range) + end + end + # Health checking configuration for VM instances. Unhealthy instances are killed # and replaced with new instances. Only applicable for instances in App Engine # flexible environment. @@ -1094,6 +1180,31 @@ module Google end end + # Response message for Firewall.ListIngressRules. + class ListIngressRulesResponse + include Google::Apis::Core::Hashable + + # The ingress FirewallRules for this application. + # Corresponds to the JSON property `ingressRules` + # @return [Array] + attr_accessor :ingress_rules + + # Continuation token for fetching the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ingress_rules = args[:ingress_rules] if args.key?(:ingress_rules) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # Response message for Instances.ListInstances. class ListInstancesResponse include Google::Apis::Core::Hashable diff --git a/generated/google/apis/appengine_v1/representations.rb b/generated/google/apis/appengine_v1/representations.rb index 801243160..182442e05 100644 --- a/generated/google/apis/appengine_v1/representations.rb +++ b/generated/google/apis/appengine_v1/representations.rb @@ -64,6 +64,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BatchUpdateIngressRulesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateIngressRulesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CertificateRawData class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,6 +148,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class FirewallRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class HealthCheck class Representation < Google::Apis::Core::JsonRepresentation; end @@ -178,6 +196,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListIngressRulesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListInstancesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -475,6 +499,22 @@ module Google end end + class BatchUpdateIngressRulesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ingress_rules, as: 'ingressRules', class: Google::Apis::AppengineV1::FirewallRule, decorator: Google::Apis::AppengineV1::FirewallRule::Representation + + end + end + + class BatchUpdateIngressRulesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ingress_rules, as: 'ingressRules', class: Google::Apis::AppengineV1::FirewallRule, decorator: Google::Apis::AppengineV1::FirewallRule::Representation + + end + end + class CertificateRawData # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -578,6 +618,16 @@ module Google end end + class FirewallRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :action, as: 'action' + property :description, as: 'description' + property :priority, as: 'priority' + property :source_range, as: 'sourceRange' + end + end + class HealthCheck # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -658,6 +708,15 @@ module Google end end + class ListIngressRulesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ingress_rules, as: 'ingressRules', class: Google::Apis::AppengineV1::FirewallRule, decorator: Google::Apis::AppengineV1::FirewallRule::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class ListInstancesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/appengine_v1/service.rb b/generated/google/apis/appengine_v1/service.rb index 6f4656349..4534efdd7 100644 --- a/generated/google/apis/appengine_v1/service.rb +++ b/generated/google/apis/appengine_v1/service.rb @@ -597,6 +597,226 @@ module Google execute_or_queue_command(command, &block) end + # Replaces the entire firewall ruleset in one bulk operation. This overrides and + # replaces the rules of an existing firewall with the new rules.If the final + # rule does not match traffic with the '*' wildcard IP range, then an "allow all" + # rule is explicitly added to the end of the list. + # @param [String] apps_id + # Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/ + # firewall/ingressRules. + # @param [Google::Apis::AppengineV1::BatchUpdateIngressRulesRequest] batch_update_ingress_rules_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::BatchUpdateIngressRulesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::BatchUpdateIngressRulesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def batch_update_ingress_rules(apps_id, batch_update_ingress_rules_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/apps/{appsId}/firewall/ingressRules:batchUpdate', options) + command.request_representation = Google::Apis::AppengineV1::BatchUpdateIngressRulesRequest::Representation + command.request_object = batch_update_ingress_rules_request_object + command.response_representation = Google::Apis::AppengineV1::BatchUpdateIngressRulesResponse::Representation + command.response_class = Google::Apis::AppengineV1::BatchUpdateIngressRulesResponse + command.params['appsId'] = apps_id unless apps_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a firewall rule for the application. + # @param [String] apps_id + # Part of `parent`. Name of the parent Firewall collection in which to create a + # new rule. Example: apps/myapp/firewall/ingressRules. + # @param [Google::Apis::AppengineV1::FirewallRule] firewall_rule_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::FirewallRule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::FirewallRule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_app_firewall_ingress_rule(apps_id, firewall_rule_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/apps/{appsId}/firewall/ingressRules', options) + command.request_representation = Google::Apis::AppengineV1::FirewallRule::Representation + command.request_object = firewall_rule_object + command.response_representation = Google::Apis::AppengineV1::FirewallRule::Representation + command.response_class = Google::Apis::AppengineV1::FirewallRule + command.params['appsId'] = apps_id unless apps_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes the specified firewall rule. + # @param [String] apps_id + # Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/ + # firewall/ingressRules/100. + # @param [String] ingress_rules_id + # Part of `name`. See documentation of `appsId`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_app_firewall_ingress_rule(apps_id, ingress_rules_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}', options) + command.response_representation = Google::Apis::AppengineV1::Empty::Representation + command.response_class = Google::Apis::AppengineV1::Empty + command.params['appsId'] = apps_id unless apps_id.nil? + command.params['ingressRulesId'] = ingress_rules_id unless ingress_rules_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the specified firewall rule. + # @param [String] apps_id + # Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/ + # firewall/ingressRules/100. + # @param [String] ingress_rules_id + # Part of `name`. See documentation of `appsId`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::FirewallRule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::FirewallRule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_app_firewall_ingress_rule(apps_id, ingress_rules_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}', options) + command.response_representation = Google::Apis::AppengineV1::FirewallRule::Representation + command.response_class = Google::Apis::AppengineV1::FirewallRule + command.params['appsId'] = apps_id unless apps_id.nil? + command.params['ingressRulesId'] = ingress_rules_id unless ingress_rules_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the firewall rules of an application. + # @param [String] apps_id + # Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/ + # myapp/firewall/ingressRules. + # @param [String] matching_address + # A valid IP Address. If set, only rules matching this address will be returned. + # The first returned rule will be the rule that fires on requests from this IP. + # @param [Fixnum] page_size + # Maximum results to return per page. + # @param [String] page_token + # Continuation token for fetching the next page of results. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::ListIngressRulesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::ListIngressRulesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_app_firewall_ingress_rules(apps_id, matching_address: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/firewall/ingressRules', options) + command.response_representation = Google::Apis::AppengineV1::ListIngressRulesResponse::Representation + command.response_class = Google::Apis::AppengineV1::ListIngressRulesResponse + command.params['appsId'] = apps_id unless apps_id.nil? + command.query['matchingAddress'] = matching_address unless matching_address.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the specified firewall rule. + # @param [String] apps_id + # Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/ + # firewall/ingressRules/100. + # @param [String] ingress_rules_id + # Part of `name`. See documentation of `appsId`. + # @param [Google::Apis::AppengineV1::FirewallRule] firewall_rule_object + # @param [String] update_mask + # Standard field mask for the set of fields to be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::AppengineV1::FirewallRule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::FirewallRule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_app_firewall_ingress_rule(apps_id, ingress_rules_id, firewall_rule_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}', options) + command.request_representation = Google::Apis::AppengineV1::FirewallRule::Representation + command.request_object = firewall_rule_object + command.response_representation = Google::Apis::AppengineV1::FirewallRule::Representation + command.response_class = Google::Apis::AppengineV1::FirewallRule + command.params['appsId'] = apps_id unless apps_id.nil? + command.params['ingressRulesId'] = ingress_rules_id unless ingress_rules_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Get information about a location. # @param [String] apps_id # Part of `name`. Resource name for the location. diff --git a/generated/google/apis/cloudfunctions_v1beta2.rb b/generated/google/apis/cloudfunctions_v1beta2.rb index 7fecee6f1..f073b43f8 100644 --- a/generated/google/apis/cloudfunctions_v1beta2.rb +++ b/generated/google/apis/cloudfunctions_v1beta2.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/functions module CloudfunctionsV1beta2 VERSION = 'V1beta2' - REVISION = '20170914' + REVISION = '20170926' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudfunctions_v1beta2/classes.rb b/generated/google/apis/cloudfunctions_v1beta2/classes.rb index 7801cf056..13b6c4bc9 100644 --- a/generated/google/apis/cloudfunctions_v1beta2/classes.rb +++ b/generated/google/apis/cloudfunctions_v1beta2/classes.rb @@ -146,11 +146,11 @@ module Google # To refer to a specific commit: # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` # To refer to a moveable alias (branch): - # `https://source.developers.google.com/projects/*/repos/*/aliases/movable/*/ + # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/ # paths/*` # In particular, to refer to HEAD use `master` moveable alias. # To refer to a specific fixed alias (tag): - # `https://source.developers.google.com/projects/*/repos/*/aliases/fixed/*/paths/ + # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/ # *` # You may omit `paths/*` if you want to use the main directory. # Corresponds to the JSON property `sourceRepositoryUrl` @@ -217,7 +217,7 @@ module Google # Handle an object changing in Google Cloud Storage # `providers/cloud.storage/eventTypes/object.change` # Handle a write to the Firebase Realtime Database - # `providers/firebase.database/eventTypes/data.write` + # `providers/google.firebase.database/eventTypes/ref.write` # Corresponds to the JSON property `eventType` # @return [String] attr_accessor :event_type diff --git a/generated/google/apis/cloudiot_v1.rb b/generated/google/apis/cloudiot_v1.rb new file mode 100644 index 000000000..deb2ded4d --- /dev/null +++ b/generated/google/apis/cloudiot_v1.rb @@ -0,0 +1,38 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/cloudiot_v1/service.rb' +require 'google/apis/cloudiot_v1/classes.rb' +require 'google/apis/cloudiot_v1/representations.rb' + +module Google + module Apis + # Google Cloud IoT API + # + # Registers and manages IoT (Internet of Things) devices that connect to the + # Google Cloud Platform. + # + # @see https://cloud.google.com/iot + module CloudiotV1 + VERSION = 'V1' + REVISION = '20170922' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # Register and manage devices in the Google Cloud IoT service + AUTH_CLOUDIOT = 'https://www.googleapis.com/auth/cloudiot' + end + end +end diff --git a/generated/google/apis/cloudiot_v1/classes.rb b/generated/google/apis/cloudiot_v1/classes.rb new file mode 100644 index 000000000..61c19e1b0 --- /dev/null +++ b/generated/google/apis/cloudiot_v1/classes.rb @@ -0,0 +1,1197 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1 + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditConfig are exempted. + # Example Policy with multiple AuditConfigs: + # ` + # "audit_configs": [ + # ` + # "service": "allServices" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:foo@gmail.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # `, + # ` + # "log_type": "ADMIN_READ", + # ` + # ] + # `, + # ` + # "service": "fooservice.googleapis.com" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # `, + # ` + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:bar@gmail.com" + # ] + # ` + # ] + # ` + # ] + # ` + # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts foo@gmail.com from DATA_READ logging, and + # bar@gmail.com from DATA_WRITE logging. + class AuditConfig + include Google::Apis::Core::Hashable + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @service = args[:service] if args.key?(:service) + end + end + + # Provides the configuration for logging a type of permissions. + # Example: + # ` + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:foo@gmail.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # ` + # ] + # ` + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # foo@gmail.com from DATA_READ logging. + class AuditLogConfig + include Google::Apis::Core::Hashable + + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of Binding.members. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + # Corresponds to the JSON property `condition` + # @return [Google::Apis::CloudiotV1::Expr] + attr_accessor :condition + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # The device resource. + class Device + include Google::Apis::Core::Hashable + + # If a device is blocked, connections or requests from this device will fail. + # Can be used to temporarily prevent the device from connecting if, for + # example, the sensor is generating bad data and needs maintenance. + # Corresponds to the JSON property `blocked` + # @return [Boolean] + attr_accessor :blocked + alias_method :blocked?, :blocked + + # The device configuration. Eventually delivered to devices. + # Corresponds to the JSON property `config` + # @return [Google::Apis::CloudiotV1::DeviceConfig] + attr_accessor :config + + # The credentials used to authenticate this device. To allow credential + # rotation without interruption, multiple device credentials can be bound to + # this device. No more than 3 credentials can be bound to a single device at + # a time. When new credentials are added to a device, they are verified + # against the registry credentials. For details, see the description of the + # `DeviceRegistry.credentials` field. + # Corresponds to the JSON property `credentials` + # @return [Array] + attr_accessor :credentials + + # The user-defined device identifier. The device ID must be unique + # within a device registry. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # [Output only] The last time a cloud-to-device config version acknowledgment + # was received from the device. This field is only for configurations + # sent through MQTT. + # Corresponds to the JSON property `lastConfigAckTime` + # @return [String] + attr_accessor :last_config_ack_time + + # [Output only] The last time a cloud-to-device config version was sent to + # the device. + # Corresponds to the JSON property `lastConfigSendTime` + # @return [String] + attr_accessor :last_config_send_time + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `lastErrorStatus` + # @return [Google::Apis::CloudiotV1::Status] + attr_accessor :last_error_status + + # [Output only] The time the most recent error occurred, such as a failure to + # publish to Cloud Pub/Sub. This field is the timestamp of + # 'last_error_status'. + # Corresponds to the JSON property `lastErrorTime` + # @return [String] + attr_accessor :last_error_time + + # [Output only] The last time a telemetry event was received. Timestamps are + # periodically collected and written to storage; they may be stale by a few + # minutes. + # Corresponds to the JSON property `lastEventTime` + # @return [String] + attr_accessor :last_event_time + + # [Output only] The last time a heartbeat was received. Timestamps are + # periodically collected and written to storage; they may be stale by a few + # minutes. This field is only for devices connecting through MQTT. + # Corresponds to the JSON property `lastHeartbeatTime` + # @return [String] + attr_accessor :last_heartbeat_time + + # [Output only] The last time a state event was received. Timestamps are + # periodically collected and written to storage; they may be stale by a few + # minutes. + # Corresponds to the JSON property `lastStateTime` + # @return [String] + attr_accessor :last_state_time + + # The metadata key-value pairs assigned to the device. This metadata is not + # interpreted or indexed by Cloud IoT Core. It can be used to add contextual + # information for the device. + # Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than + # 128 bytes in length. + # Values are free-form strings. Each value must be less than or equal to 32 + # KB in size. + # The total size of all keys and values must be less than 256 KB, and the + # maximum number of key-value pairs is 500. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The resource path name. For example, + # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``. + # When `name` is populated as a response from the service, it always ends + # in the device numeric ID. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # [Output only] A server-defined unique numeric ID for the device. This is a + # more compact way to identify devices, and it is globally unique. + # Corresponds to the JSON property `numId` + # @return [Fixnum] + attr_accessor :num_id + + # The device state, as reported by the device. + # Corresponds to the JSON property `state` + # @return [Google::Apis::CloudiotV1::DeviceState] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @blocked = args[:blocked] if args.key?(:blocked) + @config = args[:config] if args.key?(:config) + @credentials = args[:credentials] if args.key?(:credentials) + @id = args[:id] if args.key?(:id) + @last_config_ack_time = args[:last_config_ack_time] if args.key?(:last_config_ack_time) + @last_config_send_time = args[:last_config_send_time] if args.key?(:last_config_send_time) + @last_error_status = args[:last_error_status] if args.key?(:last_error_status) + @last_error_time = args[:last_error_time] if args.key?(:last_error_time) + @last_event_time = args[:last_event_time] if args.key?(:last_event_time) + @last_heartbeat_time = args[:last_heartbeat_time] if args.key?(:last_heartbeat_time) + @last_state_time = args[:last_state_time] if args.key?(:last_state_time) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @num_id = args[:num_id] if args.key?(:num_id) + @state = args[:state] if args.key?(:state) + end + end + + # The device configuration. Eventually delivered to devices. + class DeviceConfig + include Google::Apis::Core::Hashable + + # The device configuration data. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + # [Output only] The time at which this configuration version was updated in + # Cloud IoT Core. This timestamp is set by the server. + # Corresponds to the JSON property `cloudUpdateTime` + # @return [String] + attr_accessor :cloud_update_time + + # [Output only] The time at which Cloud IoT Core received the + # acknowledgment from the device, indicating that the device has received + # this configuration version. If this field is not present, the device has + # not yet acknowledged that it received this version. Note that when + # the config was sent to the device, many config versions may have been + # available in Cloud IoT Core while the device was disconnected, and on + # connection, only the latest version is sent to the device. Some + # versions may never be sent to the device, and therefore are never + # acknowledged. This timestamp is set by Cloud IoT Core. + # Corresponds to the JSON property `deviceAckTime` + # @return [String] + attr_accessor :device_ack_time + + # [Output only] The version of this update. The version number is assigned by + # the server, and is always greater than 0 after device creation. The + # version must be 0 on the `CreateDevice` request if a `config` is + # specified; the response of `CreateDevice` will always have a value of 1. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + @cloud_update_time = args[:cloud_update_time] if args.key?(:cloud_update_time) + @device_ack_time = args[:device_ack_time] if args.key?(:device_ack_time) + @version = args[:version] if args.key?(:version) + end + end + + # A server-stored device credential used for authentication. + class DeviceCredential + include Google::Apis::Core::Hashable + + # [Optional] The time at which this credential becomes invalid. This + # credential will be ignored for new client authentication requests after + # this timestamp; however, it will not be automatically deleted. + # Corresponds to the JSON property `expirationTime` + # @return [String] + attr_accessor :expiration_time + + # A public key format and data. + # Corresponds to the JSON property `publicKey` + # @return [Google::Apis::CloudiotV1::PublicKeyCredential] + attr_accessor :public_key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expiration_time = args[:expiration_time] if args.key?(:expiration_time) + @public_key = args[:public_key] if args.key?(:public_key) + end + end + + # A container for a group of devices. + class DeviceRegistry + include Google::Apis::Core::Hashable + + # The credentials used to verify the device credentials. No more than 10 + # credentials can be bound to a single registry at a time. The verification + # process occurs at the time of device creation or update. If this field is + # empty, no verification is performed. Otherwise, the credentials of a newly + # created device or added credentials of an updated device should be signed + # with one of these registry credentials. + # Note, however, that existing devices will never be affected by + # modifications to this list of credentials: after a device has been + # successfully created in a registry, it should be able to connect even if + # its registry credentials are revoked, deleted, or modified. + # Corresponds to the JSON property `credentials` + # @return [Array] + attr_accessor :credentials + + # The configuration for notification of telemetry events received from the + # device. All telemetry events that were successfully published by the + # device and acknowledged by Cloud IoT Core are guaranteed to be + # delivered to Cloud Pub/Sub. Only the first configuration is used. + # Corresponds to the JSON property `eventNotificationConfigs` + # @return [Array] + attr_accessor :event_notification_configs + + # The configuration of the HTTP bridge for a device registry. + # Corresponds to the JSON property `httpConfig` + # @return [Google::Apis::CloudiotV1::HttpConfig] + attr_accessor :http_config + + # The identifier of this device registry. For example, `myRegistry`. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The configuration of MQTT for a device registry. + # Corresponds to the JSON property `mqttConfig` + # @return [Google::Apis::CloudiotV1::MqttConfig] + attr_accessor :mqtt_config + + # The resource path name. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The configuration for notification of new states received from the device. + # Corresponds to the JSON property `stateNotificationConfig` + # @return [Google::Apis::CloudiotV1::StateNotificationConfig] + attr_accessor :state_notification_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @credentials = args[:credentials] if args.key?(:credentials) + @event_notification_configs = args[:event_notification_configs] if args.key?(:event_notification_configs) + @http_config = args[:http_config] if args.key?(:http_config) + @id = args[:id] if args.key?(:id) + @mqtt_config = args[:mqtt_config] if args.key?(:mqtt_config) + @name = args[:name] if args.key?(:name) + @state_notification_config = args[:state_notification_config] if args.key?(:state_notification_config) + end + end + + # The device state, as reported by the device. + class DeviceState + include Google::Apis::Core::Hashable + + # The device state data. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + # [Output only] The time at which this state version was updated in Cloud + # IoT Core. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The configuration to forward telemetry events. + class EventNotificationConfig + include Google::Apis::Core::Hashable + + # A Cloud Pub/Sub topic name. For example, + # `projects/myProject/topics/deviceEvents`. + # Corresponds to the JSON property `pubsubTopicName` + # @return [String] + attr_accessor :pubsub_topic_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name) + end + end + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + class Expr + include Google::Apis::Core::Hashable + + # An optional description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Textual representation of an expression in + # Common Expression Language syntax. + # The application context of the containing message determines which + # well-known feature set of CEL is supported. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # An optional string indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # An optional title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @expression = args[:expression] if args.key?(:expression) + @location = args[:location] if args.key?(:location) + @title = args[:title] if args.key?(:title) + end + end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The configuration of the HTTP bridge for a device registry. + class HttpConfig + include Google::Apis::Core::Hashable + + # If enabled, allows devices to use DeviceService via the HTTP protocol. + # Otherwise, any requests to DeviceService will fail for this registry. + # Corresponds to the JSON property `httpEnabledState` + # @return [String] + attr_accessor :http_enabled_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @http_enabled_state = args[:http_enabled_state] if args.key?(:http_enabled_state) + end + end + + # Response for `ListDeviceConfigVersions`. + class ListDeviceConfigVersionsResponse + include Google::Apis::Core::Hashable + + # The device configuration for the last few versions. Versions are listed + # in decreasing order, starting from the most recent one. + # Corresponds to the JSON property `deviceConfigs` + # @return [Array] + attr_accessor :device_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_configs = args[:device_configs] if args.key?(:device_configs) + end + end + + # Response for `ListDeviceRegistries`. + class ListDeviceRegistriesResponse + include Google::Apis::Core::Hashable + + # The registries that matched the query. + # Corresponds to the JSON property `deviceRegistries` + # @return [Array] + attr_accessor :device_registries + + # If not empty, indicates that there may be more registries that match the + # request; this value should be passed in a new + # `ListDeviceRegistriesRequest`. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_registries = args[:device_registries] if args.key?(:device_registries) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for `ListDeviceStates`. + class ListDeviceStatesResponse + include Google::Apis::Core::Hashable + + # The last few device states. States are listed in descending order of server + # update time, starting from the most recent one. + # Corresponds to the JSON property `deviceStates` + # @return [Array] + attr_accessor :device_states + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_states = args[:device_states] if args.key?(:device_states) + end + end + + # Response for `ListDevices`. + class ListDevicesResponse + include Google::Apis::Core::Hashable + + # The devices that match the request. + # Corresponds to the JSON property `devices` + # @return [Array] + attr_accessor :devices + + # If not empty, indicates that there may be more devices that match the + # request; this value should be passed in a new `ListDevicesRequest`. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @devices = args[:devices] if args.key?(:devices) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Request for `ModifyCloudToDeviceConfig`. + class ModifyCloudToDeviceConfigRequest + include Google::Apis::Core::Hashable + + # The configuration data for the device. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + # The version number to update. If this value is zero, it will not check the + # version number of the server and will always update the current version; + # otherwise, this update will fail if the version number found on the server + # does not match this version number. This is used to support multiple + # simultaneous updates without losing data. + # Corresponds to the JSON property `versionToUpdate` + # @return [Fixnum] + attr_accessor :version_to_update + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + @version_to_update = args[:version_to_update] if args.key?(:version_to_update) + end + end + + # The configuration of MQTT for a device registry. + class MqttConfig + include Google::Apis::Core::Hashable + + # If enabled, allows connections using the MQTT protocol. Otherwise, MQTT + # connections to this registry will fail. + # Corresponds to the JSON property `mqttEnabledState` + # @return [String] + attr_accessor :mqtt_enabled_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @mqtt_enabled_state = args[:mqtt_enabled_state] if args.key?(:mqtt_enabled_state) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # + # Corresponds to the JSON property `iamOwned` + # @return [Boolean] + attr_accessor :iam_owned + alias_method :iam_owned?, :iam_owned + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @iam_owned = args[:iam_owned] if args.key?(:iam_owned) + @version = args[:version] if args.key?(:version) + end + end + + # A public key certificate format and data. + class PublicKeyCertificate + include Google::Apis::Core::Hashable + + # The certificate data. + # Corresponds to the JSON property `certificate` + # @return [String] + attr_accessor :certificate + + # The certificate format. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # Details of an X.509 certificate. For informational purposes only. + # Corresponds to the JSON property `x509Details` + # @return [Google::Apis::CloudiotV1::X509CertificateDetails] + attr_accessor :x509_details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @certificate = args[:certificate] if args.key?(:certificate) + @format = args[:format] if args.key?(:format) + @x509_details = args[:x509_details] if args.key?(:x509_details) + end + end + + # A public key format and data. + class PublicKeyCredential + include Google::Apis::Core::Hashable + + # The format of the key. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # The key data. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @key = args[:key] if args.key?(:key) + end + end + + # A server-stored registry credential used to validate device credentials. + class RegistryCredential + include Google::Apis::Core::Hashable + + # A public key certificate format and data. + # Corresponds to the JSON property `publicKeyCertificate` + # @return [Google::Apis::CloudiotV1::PublicKeyCertificate] + attr_accessor :public_key_certificate + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @public_key_certificate = args[:public_key_certificate] if args.key?(:public_key_certificate) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudiotV1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # paths: "bindings, etag" + # This field is only used by Cloud IAM. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # The configuration for notification of new states received from the device. + class StateNotificationConfig + include Google::Apis::Core::Hashable + + # A Cloud Pub/Sub topic name. For example, + # `projects/myProject/topics/deviceEvents`. + # Corresponds to the JSON property `pubsubTopicName` + # @return [String] + attr_accessor :pubsub_topic_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Details of an X.509 certificate. For informational purposes only. + class X509CertificateDetails + include Google::Apis::Core::Hashable + + # The time the certificate becomes invalid. + # Corresponds to the JSON property `expiryTime` + # @return [String] + attr_accessor :expiry_time + + # The entity that signed the certificate. + # Corresponds to the JSON property `issuer` + # @return [String] + attr_accessor :issuer + + # The type of public key in the certificate. + # Corresponds to the JSON property `publicKeyType` + # @return [String] + attr_accessor :public_key_type + + # The algorithm used to sign the certificate. + # Corresponds to the JSON property `signatureAlgorithm` + # @return [String] + attr_accessor :signature_algorithm + + # The time the certificate becomes valid. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The entity the certificate and public key belong to. + # Corresponds to the JSON property `subject` + # @return [String] + attr_accessor :subject + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expiry_time = args[:expiry_time] if args.key?(:expiry_time) + @issuer = args[:issuer] if args.key?(:issuer) + @public_key_type = args[:public_key_type] if args.key?(:public_key_type) + @signature_algorithm = args[:signature_algorithm] if args.key?(:signature_algorithm) + @start_time = args[:start_time] if args.key?(:start_time) + @subject = args[:subject] if args.key?(:subject) + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1/representations.rb b/generated/google/apis/cloudiot_v1/representations.rb new file mode 100644 index 000000000..251a6c146 --- /dev/null +++ b/generated/google/apis/cloudiot_v1/representations.rb @@ -0,0 +1,473 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1 + + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Device + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceCredential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceRegistry + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceState + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EventNotificationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Expr + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDeviceConfigVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDeviceRegistriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDeviceStatesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDevicesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModifyCloudToDeviceConfigRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MqttConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublicKeyCertificate + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublicKeyCredential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RegistryCredential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StateNotificationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class X509CertificateDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudiotV1::AuditLogConfig, decorator: Google::Apis::CloudiotV1::AuditLogConfig::Representation + + collection :exempted_members, as: 'exemptedMembers' + property :service, as: 'service' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::CloudiotV1::Expr, decorator: Google::Apis::CloudiotV1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Device + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :blocked, as: 'blocked' + property :config, as: 'config', class: Google::Apis::CloudiotV1::DeviceConfig, decorator: Google::Apis::CloudiotV1::DeviceConfig::Representation + + collection :credentials, as: 'credentials', class: Google::Apis::CloudiotV1::DeviceCredential, decorator: Google::Apis::CloudiotV1::DeviceCredential::Representation + + property :id, as: 'id' + property :last_config_ack_time, as: 'lastConfigAckTime' + property :last_config_send_time, as: 'lastConfigSendTime' + property :last_error_status, as: 'lastErrorStatus', class: Google::Apis::CloudiotV1::Status, decorator: Google::Apis::CloudiotV1::Status::Representation + + property :last_error_time, as: 'lastErrorTime' + property :last_event_time, as: 'lastEventTime' + property :last_heartbeat_time, as: 'lastHeartbeatTime' + property :last_state_time, as: 'lastStateTime' + hash :metadata, as: 'metadata' + property :name, as: 'name' + property :num_id, :numeric_string => true, as: 'numId' + property :state, as: 'state', class: Google::Apis::CloudiotV1::DeviceState, decorator: Google::Apis::CloudiotV1::DeviceState::Representation + + end + end + + class DeviceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + property :cloud_update_time, as: 'cloudUpdateTime' + property :device_ack_time, as: 'deviceAckTime' + property :version, :numeric_string => true, as: 'version' + end + end + + class DeviceCredential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expiration_time, as: 'expirationTime' + property :public_key, as: 'publicKey', class: Google::Apis::CloudiotV1::PublicKeyCredential, decorator: Google::Apis::CloudiotV1::PublicKeyCredential::Representation + + end + end + + class DeviceRegistry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :credentials, as: 'credentials', class: Google::Apis::CloudiotV1::RegistryCredential, decorator: Google::Apis::CloudiotV1::RegistryCredential::Representation + + collection :event_notification_configs, as: 'eventNotificationConfigs', class: Google::Apis::CloudiotV1::EventNotificationConfig, decorator: Google::Apis::CloudiotV1::EventNotificationConfig::Representation + + property :http_config, as: 'httpConfig', class: Google::Apis::CloudiotV1::HttpConfig, decorator: Google::Apis::CloudiotV1::HttpConfig::Representation + + property :id, as: 'id' + property :mqtt_config, as: 'mqttConfig', class: Google::Apis::CloudiotV1::MqttConfig, decorator: Google::Apis::CloudiotV1::MqttConfig::Representation + + property :name, as: 'name' + property :state_notification_config, as: 'stateNotificationConfig', class: Google::Apis::CloudiotV1::StateNotificationConfig, decorator: Google::Apis::CloudiotV1::StateNotificationConfig::Representation + + end + end + + class DeviceState + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + property :update_time, as: 'updateTime' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class EventNotificationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pubsub_topic_name, as: 'pubsubTopicName' + end + end + + class Expr + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :expression, as: 'expression' + property :location, as: 'location' + property :title, as: 'title' + end + end + + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class HttpConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :http_enabled_state, as: 'httpEnabledState' + end + end + + class ListDeviceConfigVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :device_configs, as: 'deviceConfigs', class: Google::Apis::CloudiotV1::DeviceConfig, decorator: Google::Apis::CloudiotV1::DeviceConfig::Representation + + end + end + + class ListDeviceRegistriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :device_registries, as: 'deviceRegistries', class: Google::Apis::CloudiotV1::DeviceRegistry, decorator: Google::Apis::CloudiotV1::DeviceRegistry::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListDeviceStatesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :device_states, as: 'deviceStates', class: Google::Apis::CloudiotV1::DeviceState, decorator: Google::Apis::CloudiotV1::DeviceState::Representation + + end + end + + class ListDevicesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :devices, as: 'devices', class: Google::Apis::CloudiotV1::Device, decorator: Google::Apis::CloudiotV1::Device::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ModifyCloudToDeviceConfigRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + property :version_to_update, :numeric_string => true, as: 'versionToUpdate' + end + end + + class MqttConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :mqtt_enabled_state, as: 'mqttEnabledState' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudiotV1::AuditConfig, decorator: Google::Apis::CloudiotV1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::CloudiotV1::Binding, decorator: Google::Apis::CloudiotV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :iam_owned, as: 'iamOwned' + property :version, as: 'version' + end + end + + class PublicKeyCertificate + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :certificate, as: 'certificate' + property :format, as: 'format' + property :x509_details, as: 'x509Details', class: Google::Apis::CloudiotV1::X509CertificateDetails, decorator: Google::Apis::CloudiotV1::X509CertificateDetails::Representation + + end + end + + class PublicKeyCredential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format' + property :key, as: 'key' + end + end + + class RegistryCredential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :public_key_certificate, as: 'publicKeyCertificate', class: Google::Apis::CloudiotV1::PublicKeyCertificate, decorator: Google::Apis::CloudiotV1::PublicKeyCertificate::Representation + + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudiotV1::Policy, decorator: Google::Apis::CloudiotV1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class StateNotificationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pubsub_topic_name, as: 'pubsubTopicName' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class X509CertificateDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expiry_time, as: 'expiryTime' + property :issuer, as: 'issuer' + property :public_key_type, as: 'publicKeyType' + property :signature_algorithm, as: 'signatureAlgorithm' + property :start_time, as: 'startTime' + property :subject, as: 'subject' + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1/service.rb b/generated/google/apis/cloudiot_v1/service.rb new file mode 100644 index 000000000..896c2e2ba --- /dev/null +++ b/generated/google/apis/cloudiot_v1/service.rb @@ -0,0 +1,657 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1 + # Google Cloud IoT API + # + # Registers and manages IoT (Internet of Things) devices that connect to the + # Google Cloud Platform. + # + # @example + # require 'google/apis/cloudiot_v1' + # + # Cloudiot = Google::Apis::CloudiotV1 # Alias the module + # service = Cloudiot::CloudIotService.new + # + # @see https://cloud.google.com/iot + class CloudIotService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://cloudiot.googleapis.com/', '') + @batch_path = 'batch' + end + + # Creates a device registry that contains devices. + # @param [String] parent + # The project and cloud region where this device registry must be created. + # For example, `projects/example-project/locations/us-central1`. + # @param [Google::Apis::CloudiotV1::DeviceRegistry] device_registry_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/registries', options) + command.request_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation + command.request_object = device_registry_object + command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1::DeviceRegistry + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a device registry configuration. + # @param [String] name + # The name of the device registry. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1::Empty::Representation + command.response_class = Google::Apis::CloudiotV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a device registry configuration. + # @param [String] name + # The name of the device registry. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1::DeviceRegistry + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudiotV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudiotV1::Policy::Representation + command.response_class = Google::Apis::CloudiotV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists device registries. + # @param [String] parent + # The project and cloud region path. For example, + # `projects/example-project/locations/us-central1`. + # @param [Fixnum] page_size + # The maximum number of registries to return in the response. If this value + # is zero, the service will select a default size. A call may return fewer + # objects than requested, but if there is a non-empty `page_token`, it + # indicates that more entries are available. + # @param [String] page_token + # The value returned by the last `ListDeviceRegistriesResponse`; indicates + # that this is a continuation of a prior `ListDeviceRegistries` call, and + # that the system should return the next page of data. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::ListDeviceRegistriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::ListDeviceRegistriesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/registries', options) + command.response_representation = Google::Apis::CloudiotV1::ListDeviceRegistriesResponse::Representation + command.response_class = Google::Apis::CloudiotV1::ListDeviceRegistriesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a device registry configuration. + # @param [String] name + # The resource path name. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [Google::Apis::CloudiotV1::DeviceRegistry] device_registry_object + # @param [String] update_mask + # Only updates the `device_registry` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # Mutable top-level fields: `event_notification_config`, `mqtt_config`, and + # `state_notification_config`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation + command.request_object = device_registry_object + command.response_representation = Google::Apis::CloudiotV1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1::DeviceRegistry + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudiotV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudiotV1::Policy::Representation + command.response_class = Google::Apis::CloudiotV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudiotV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudiotV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudiotV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a device in a device registry. + # @param [String] parent + # The name of the device registry where this device should be created. + # For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [Google::Apis::CloudiotV1::Device] device_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/devices', options) + command.request_representation = Google::Apis::CloudiotV1::Device::Representation + command.request_object = device_object + command.response_representation = Google::Apis::CloudiotV1::Device::Representation + command.response_class = Google::Apis::CloudiotV1::Device + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1::Empty::Representation + command.response_class = Google::Apis::CloudiotV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1::Device::Representation + command.response_class = Google::Apis::CloudiotV1::Device + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List devices in a device registry. + # @param [String] parent + # The device registry path. Required. For example, + # `projects/my-project/locations/us-central1/registries/my-registry`. + # @param [Array, String] device_ids + # A list of device string identifiers. If empty, it will ignore this field. + # For example, `['device0', 'device12']`. This field cannot hold more than + # 10,000 entries. + # @param [Array, Fixnum] device_num_ids + # A list of device numerical ids. If empty, it will ignore this field. This + # field cannot hold more than 10,000 entries. + # @param [String] field_mask + # The fields of the `Device` resource to be returned in the response. The + # fields `id`, and `num_id` are always returned by default, along with any + # other fields specified. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. If this value + # is zero, the service will select a default size. A call may return fewer + # objects than requested, but if there is a non-empty `page_token`, it + # indicates that more entries are available. + # @param [String] page_token + # The value returned by the last `ListDevicesResponse`; indicates + # that this is a continuation of a prior `ListDevices` call, and + # that the system should return the next page of data. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::ListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::ListDevicesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/devices', options) + command.response_representation = Google::Apis::CloudiotV1::ListDevicesResponse::Representation + command.response_class = Google::Apis::CloudiotV1::ListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['deviceIds'] = device_ids unless device_ids.nil? + command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil? + command.query['fieldMask'] = field_mask unless field_mask.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Modifies the configuration for the device, which is eventually sent from + # the Cloud IoT Core servers. Returns the modified configuration version and + # its metadata. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest] modify_cloud_to_device_config_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::DeviceConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::DeviceConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:modifyCloudToDeviceConfig', options) + command.request_representation = Google::Apis::CloudiotV1::ModifyCloudToDeviceConfigRequest::Representation + command.request_object = modify_cloud_to_device_config_request_object + command.response_representation = Google::Apis::CloudiotV1::DeviceConfig::Representation + command.response_class = Google::Apis::CloudiotV1::DeviceConfig + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a device. + # @param [String] name + # The resource path name. For example, + # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``. + # When `name` is populated as a response from the service, it always ends + # in the device numeric ID. + # @param [Google::Apis::CloudiotV1::Device] device_object + # @param [String] update_mask + # Only updates the `device` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # Mutable top-level fields: `credentials`, `enabled_state`, and `metadata` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::CloudiotV1::Device::Representation + command.request_object = device_object + command.response_representation = Google::Apis::CloudiotV1::Device::Representation + command.response_class = Google::Apis::CloudiotV1::Device + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the last few versions of the device configuration in descending + # order (i.e.: newest first). + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [Fixnum] num_versions + # The number of versions to list. Versions are listed in decreasing order of + # the version number. The maximum number of versions retained is 10. If this + # value is zero, it will return all the versions available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/configVersions', options) + command.response_representation = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse::Representation + command.response_class = Google::Apis::CloudiotV1::ListDeviceConfigVersionsResponse + command.params['name'] = name unless name.nil? + command.query['numVersions'] = num_versions unless num_versions.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the last few versions of the device state in descending order (i.e.: + # newest first). + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [Fixnum] num_states + # The number of states to list. States are listed in descending order of + # update time. The maximum number of states retained is 10. If this + # value is zero, it will return all the states available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1::ListDeviceStatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1::ListDeviceStatesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registry_device_states(name, num_states: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/states', options) + command.response_representation = Google::Apis::CloudiotV1::ListDeviceStatesResponse::Representation + command.response_class = Google::Apis::CloudiotV1::ListDeviceStatesResponse + command.params['name'] = name unless name.nil? + command.query['numStates'] = num_states unless num_states.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1beta1.rb b/generated/google/apis/cloudiot_v1beta1.rb new file mode 100644 index 000000000..c27383b2c --- /dev/null +++ b/generated/google/apis/cloudiot_v1beta1.rb @@ -0,0 +1,38 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/cloudiot_v1beta1/service.rb' +require 'google/apis/cloudiot_v1beta1/classes.rb' +require 'google/apis/cloudiot_v1beta1/representations.rb' + +module Google + module Apis + # Google Cloud IoT API + # + # Registers and manages IoT (Internet of Things) devices that connect to the + # Google Cloud Platform. + # + # @see https://cloud.google.com/iot + module CloudiotV1beta1 + VERSION = 'V1beta1' + REVISION = '20170922' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # Register and manage devices in the Google Cloud IoT service + AUTH_CLOUDIOT = 'https://www.googleapis.com/auth/cloudiot' + end + end +end diff --git a/generated/google/apis/cloudiot_v1beta1/classes.rb b/generated/google/apis/cloudiot_v1beta1/classes.rb new file mode 100644 index 000000000..2b55bf337 --- /dev/null +++ b/generated/google/apis/cloudiot_v1beta1/classes.rb @@ -0,0 +1,1064 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1beta1 + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditConfig are exempted. + # Example Policy with multiple AuditConfigs: + # ` + # "audit_configs": [ + # ` + # "service": "allServices" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:foo@gmail.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # `, + # ` + # "log_type": "ADMIN_READ", + # ` + # ] + # `, + # ` + # "service": "fooservice.googleapis.com" + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # `, + # ` + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:bar@gmail.com" + # ] + # ` + # ] + # ` + # ] + # ` + # For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts foo@gmail.com from DATA_READ logging, and + # bar@gmail.com from DATA_WRITE logging. + class AuditConfig + include Google::Apis::Core::Hashable + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @service = args[:service] if args.key?(:service) + end + end + + # Provides the configuration for logging a type of permissions. + # Example: + # ` + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:foo@gmail.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # ` + # ] + # ` + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # foo@gmail.com from DATA_READ logging. + class AuditLogConfig + include Google::Apis::Core::Hashable + + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of Binding.members. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + # Corresponds to the JSON property `condition` + # @return [Google::Apis::CloudiotV1beta1::Expr] + attr_accessor :condition + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # The device resource. + class Device + include Google::Apis::Core::Hashable + + # The device configuration and its metadata. Eventually delivered to devices. + # Corresponds to the JSON property `config` + # @return [Google::Apis::CloudiotV1beta1::DeviceConfig] + attr_accessor :config + + # The credentials used to authenticate this device. To allow credential + # rotation without interruption, multiple device credentials can be bound to + # this device. No more than 3 credentials can be bound to a single device at + # a time. + # Corresponds to the JSON property `credentials` + # @return [Array] + attr_accessor :credentials + + # If a device is disabled, communication from it will be blocked. Can be used + # to temporarily prevent the device from connecting if, for example, the + # sensor is generating bad data and needs maintenance. + # Corresponds to the JSON property `enabledState` + # @return [String] + attr_accessor :enabled_state + + # The user-defined device identifier. The device ID must be unique + # within a device registry. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # [Output only] The last time a cloud-to-device config version acknowledgment + # was received from the device. + # Corresponds to the JSON property `lastConfigAckTime` + # @return [String] + attr_accessor :last_config_ack_time + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `lastErrorStatus` + # @return [Google::Apis::CloudiotV1beta1::Status] + attr_accessor :last_error_status + + # [Output only] The last time an error happened, e.g., failed to publish to + # Cloud Pub/Sub. This field is the timestamp of 'last_error_status'. + # Corresponds to the JSON property `lastErrorTime` + # @return [String] + attr_accessor :last_error_time + + # [Output only] The last time an event was received. Timestamps are + # periodically collected and written to storage; they may be stale by a few + # minutes. + # Corresponds to the JSON property `lastEventTime` + # @return [String] + attr_accessor :last_event_time + + # [Output only] The last time a heartbeat was received. Timestamps are + # periodically collected and written to storage; they may be stale by a few + # minutes. + # Corresponds to the JSON property `lastHeartbeatTime` + # @return [String] + attr_accessor :last_heartbeat_time + + # The resource path name. For example, + # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``. + # When `name` is populated as a response from the service, it always ends + # in the device numeric ID. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # [Output only] A server-defined unique numeric ID for the device. This is a + # more compact way to identify devices, and it is globally unique. + # Corresponds to the JSON property `numId` + # @return [Fixnum] + attr_accessor :num_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + @credentials = args[:credentials] if args.key?(:credentials) + @enabled_state = args[:enabled_state] if args.key?(:enabled_state) + @id = args[:id] if args.key?(:id) + @last_config_ack_time = args[:last_config_ack_time] if args.key?(:last_config_ack_time) + @last_error_status = args[:last_error_status] if args.key?(:last_error_status) + @last_error_time = args[:last_error_time] if args.key?(:last_error_time) + @last_event_time = args[:last_event_time] if args.key?(:last_event_time) + @last_heartbeat_time = args[:last_heartbeat_time] if args.key?(:last_heartbeat_time) + @name = args[:name] if args.key?(:name) + @num_id = args[:num_id] if args.key?(:num_id) + end + end + + # The device configuration and its metadata. Eventually delivered to devices. + class DeviceConfig + include Google::Apis::Core::Hashable + + # [Output only] The time when this version state was updated in the Cloud IoT + # Core service. This timestamp is set by the server. + # Corresponds to the JSON property `cloudUpdateTime` + # @return [String] + attr_accessor :cloud_update_time + + # The data for a device configuration. Only binary data is currently supported. + # Corresponds to the JSON property `data` + # @return [Google::Apis::CloudiotV1beta1::DeviceConfigData] + attr_accessor :data + + # [Output only] The time when the Cloud IoT Core server received the + # acknowledgment from the device, indicating that the device has received + # this configuration version. If this field is not present, the device has + # not yet acknowledged that it received this version. Note that when sending + # the config to the device, there may have been many config versions on the + # Cloud IoT Core service while the device was disconnected; and on + # connection, only the latest version is sent to the device. Some of the + # versions may never be sent to the device, and therefore are never + # acknowledged. This timestamp is set by the Cloud IoT Core service. + # Corresponds to the JSON property `deviceAckTime` + # @return [String] + attr_accessor :device_ack_time + + # [Output only] The version of this update. The version number is assigned by + # the server, and is always greater than zero after device creation. The + # version must be zero on the `CreateDevice` request if a `config` is + # specified; the response of `CreateDevice` will always have a value of one. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cloud_update_time = args[:cloud_update_time] if args.key?(:cloud_update_time) + @data = args[:data] if args.key?(:data) + @device_ack_time = args[:device_ack_time] if args.key?(:device_ack_time) + @version = args[:version] if args.key?(:version) + end + end + + # The data for a device configuration. Only binary data is currently supported. + class DeviceConfigData + include Google::Apis::Core::Hashable + + # The configuration sent to the device, as bytes. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + end + end + + # A server-stored device credential used for authentication. + class DeviceCredential + include Google::Apis::Core::Hashable + + # [Optional] The time at which this credential becomes invalid. This + # credential will be ignored for new client authentication requests after + # this timestamp; however, it will not be automatically deleted. + # Corresponds to the JSON property `expirationTime` + # @return [String] + attr_accessor :expiration_time + + # A public key format and data. + # Corresponds to the JSON property `publicKey` + # @return [Google::Apis::CloudiotV1beta1::PublicKeyCredential] + attr_accessor :public_key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expiration_time = args[:expiration_time] if args.key?(:expiration_time) + @public_key = args[:public_key] if args.key?(:public_key) + end + end + + # A container for a group of devices. + class DeviceRegistry + include Google::Apis::Core::Hashable + + # Configuration to forward messages such as telemetry events. + # Corresponds to the JSON property `eventNotificationConfig` + # @return [Google::Apis::CloudiotV1beta1::NotificationConfig] + attr_accessor :event_notification_config + + # The identifier of this device registry. For example, `myRegistry`. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The configuration of MQTT for a device registry. + # Corresponds to the JSON property `mqttConfig` + # @return [Google::Apis::CloudiotV1beta1::MqttConfig] + attr_accessor :mqtt_config + + # The resource path name. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @event_notification_config = args[:event_notification_config] if args.key?(:event_notification_config) + @id = args[:id] if args.key?(:id) + @mqtt_config = args[:mqtt_config] if args.key?(:mqtt_config) + @name = args[:name] if args.key?(:name) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Represents an expression text. Example: + # title: "User account presence" + # description: "Determines whether the request has a user account" + # expression: "size(request.user) > 0" + class Expr + include Google::Apis::Core::Hashable + + # An optional description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Textual representation of an expression in + # Common Expression Language syntax. + # The application context of the containing message determines which + # well-known feature set of CEL is supported. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # An optional string indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # An optional title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @expression = args[:expression] if args.key?(:expression) + @location = args[:location] if args.key?(:location) + @title = args[:title] if args.key?(:title) + end + end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The device configuration obtained from Cloud IoT Core. + class HttpDeviceConfig + include Google::Apis::Core::Hashable + + # Data in binary format. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + # The version of the configuration in Cloud IoT Core. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + @version = args[:version] if args.key?(:version) + end + end + + # The device state reported to Cloud IoT Core. + class HttpDeviceState + include Google::Apis::Core::Hashable + + # Data in binary format. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + end + end + + # Request for `PublishEvent`. + class HttpPublishEventRequest + include Google::Apis::Core::Hashable + + # Payload data in binary format. + # Corresponds to the JSON property `binaryData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :binary_data + + # Optional subfolder for the telemetry event. This can be used to classify + # types of events, and is included in the Pub/Sub message attributes. + # Corresponds to the JSON property `subFolder` + # @return [String] + attr_accessor :sub_folder + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binary_data = args[:binary_data] if args.key?(:binary_data) + @sub_folder = args[:sub_folder] if args.key?(:sub_folder) + end + end + + # Response for `PublishEvent`. + class HttpPublishEventResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Request for `SetDeviceState`. + class HttpSetDeviceStateRequest + include Google::Apis::Core::Hashable + + # The device state reported to Cloud IoT Core. + # Corresponds to the JSON property `state` + # @return [Google::Apis::CloudiotV1beta1::HttpDeviceState] + attr_accessor :state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + end + end + + # Response for `ListDeviceConfigVersions`. + class ListDeviceConfigVersionsResponse + include Google::Apis::Core::Hashable + + # The device configuration for the last few versions. Versions are listed + # in decreasing order, starting from the most recent one. + # Corresponds to the JSON property `deviceConfigs` + # @return [Array] + attr_accessor :device_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_configs = args[:device_configs] if args.key?(:device_configs) + end + end + + # Response for `ListDeviceRegistries`. + class ListDeviceRegistriesResponse + include Google::Apis::Core::Hashable + + # The registries that matched the query. + # Corresponds to the JSON property `deviceRegistries` + # @return [Array] + attr_accessor :device_registries + + # If not empty, indicates that there may be more registries that match the + # request; this value should be passed in a new + # `ListDeviceRegistriesRequest`. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @device_registries = args[:device_registries] if args.key?(:device_registries) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for `ListDevices`. + class ListDevicesResponse + include Google::Apis::Core::Hashable + + # The devices that match the request. + # Corresponds to the JSON property `devices` + # @return [Array] + attr_accessor :devices + + # If not empty, indicates that there may be more devices that match the + # request; this value should be passed in a new `ListDevicesRequest`. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @devices = args[:devices] if args.key?(:devices) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Request for `ModifyCloudToDeviceConfig`. + class ModifyCloudToDeviceConfigRequest + include Google::Apis::Core::Hashable + + # The data for a device configuration. Only binary data is currently supported. + # Corresponds to the JSON property `data` + # @return [Google::Apis::CloudiotV1beta1::DeviceConfigData] + attr_accessor :data + + # The version number to update. If this value is zero, it will not check the + # version number of the server and will always update the current version; + # otherwise, this update will fail if the version number found on the server + # does not match this version number. This is used to support multiple + # simultaneous updates without losing data. + # Corresponds to the JSON property `versionToUpdate` + # @return [Fixnum] + attr_accessor :version_to_update + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @version_to_update = args[:version_to_update] if args.key?(:version_to_update) + end + end + + # The configuration of MQTT for a device registry. + class MqttConfig + include Google::Apis::Core::Hashable + + # If enabled, allows connections using the MQTT protocol. Otherwise any MQTT + # connection to this registry will fail. + # Corresponds to the JSON property `mqttConfigState` + # @return [String] + attr_accessor :mqtt_config_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @mqtt_config_state = args[:mqtt_config_state] if args.key?(:mqtt_config_state) + end + end + + # Configuration to forward messages such as telemetry events. + class NotificationConfig + include Google::Apis::Core::Hashable + + # A Cloud Pub/Sub topic name. For example, + # `projects/myProject/topics/deviceEvents`. + # Corresponds to the JSON property `pubsubTopicName` + # @return [String] + attr_accessor :pubsub_topic_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pubsub_topic_name = args[:pubsub_topic_name] if args.key?(:pubsub_topic_name) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :etag + + # + # Corresponds to the JSON property `iamOwned` + # @return [Boolean] + attr_accessor :iam_owned + alias_method :iam_owned?, :iam_owned + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @iam_owned = args[:iam_owned] if args.key?(:iam_owned) + @version = args[:version] if args.key?(:version) + end + end + + # A public key format and data. + class PublicKeyCredential + include Google::Apis::Core::Hashable + + # The format of the key. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # The key data. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @key = args[:key] if args.key?(:key) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudiotV1beta1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # paths: "bindings, etag" + # This field is only used by Cloud IAM. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1beta1/representations.rb b/generated/google/apis/cloudiot_v1beta1/representations.rb new file mode 100644 index 000000000..4cb603b3c --- /dev/null +++ b/generated/google/apis/cloudiot_v1beta1/representations.rb @@ -0,0 +1,442 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1beta1 + + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Device + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceConfigData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceCredential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeviceRegistry + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Expr + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpDeviceConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpDeviceState + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpPublishEventRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpPublishEventResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HttpSetDeviceStateRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDeviceConfigVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDeviceRegistriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDevicesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModifyCloudToDeviceConfigRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MqttConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NotificationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublicKeyCredential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudiotV1beta1::AuditLogConfig, decorator: Google::Apis::CloudiotV1beta1::AuditLogConfig::Representation + + collection :exempted_members, as: 'exemptedMembers' + property :service, as: 'service' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::CloudiotV1beta1::Expr, decorator: Google::Apis::CloudiotV1beta1::Expr::Representation + + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Device + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config', class: Google::Apis::CloudiotV1beta1::DeviceConfig, decorator: Google::Apis::CloudiotV1beta1::DeviceConfig::Representation + + collection :credentials, as: 'credentials', class: Google::Apis::CloudiotV1beta1::DeviceCredential, decorator: Google::Apis::CloudiotV1beta1::DeviceCredential::Representation + + property :enabled_state, as: 'enabledState' + property :id, as: 'id' + property :last_config_ack_time, as: 'lastConfigAckTime' + property :last_error_status, as: 'lastErrorStatus', class: Google::Apis::CloudiotV1beta1::Status, decorator: Google::Apis::CloudiotV1beta1::Status::Representation + + property :last_error_time, as: 'lastErrorTime' + property :last_event_time, as: 'lastEventTime' + property :last_heartbeat_time, as: 'lastHeartbeatTime' + property :name, as: 'name' + property :num_id, :numeric_string => true, as: 'numId' + end + end + + class DeviceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cloud_update_time, as: 'cloudUpdateTime' + property :data, as: 'data', class: Google::Apis::CloudiotV1beta1::DeviceConfigData, decorator: Google::Apis::CloudiotV1beta1::DeviceConfigData::Representation + + property :device_ack_time, as: 'deviceAckTime' + property :version, :numeric_string => true, as: 'version' + end + end + + class DeviceConfigData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + end + end + + class DeviceCredential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expiration_time, as: 'expirationTime' + property :public_key, as: 'publicKey', class: Google::Apis::CloudiotV1beta1::PublicKeyCredential, decorator: Google::Apis::CloudiotV1beta1::PublicKeyCredential::Representation + + end + end + + class DeviceRegistry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :event_notification_config, as: 'eventNotificationConfig', class: Google::Apis::CloudiotV1beta1::NotificationConfig, decorator: Google::Apis::CloudiotV1beta1::NotificationConfig::Representation + + property :id, as: 'id' + property :mqtt_config, as: 'mqttConfig', class: Google::Apis::CloudiotV1beta1::MqttConfig, decorator: Google::Apis::CloudiotV1beta1::MqttConfig::Representation + + property :name, as: 'name' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Expr + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :expression, as: 'expression' + property :location, as: 'location' + property :title, as: 'title' + end + end + + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class HttpDeviceConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + property :version, :numeric_string => true, as: 'version' + end + end + + class HttpDeviceState + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + end + end + + class HttpPublishEventRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :binary_data, :base64 => true, as: 'binaryData' + property :sub_folder, as: 'subFolder' + end + end + + class HttpPublishEventResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class HttpSetDeviceStateRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state', class: Google::Apis::CloudiotV1beta1::HttpDeviceState, decorator: Google::Apis::CloudiotV1beta1::HttpDeviceState::Representation + + end + end + + class ListDeviceConfigVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :device_configs, as: 'deviceConfigs', class: Google::Apis::CloudiotV1beta1::DeviceConfig, decorator: Google::Apis::CloudiotV1beta1::DeviceConfig::Representation + + end + end + + class ListDeviceRegistriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :device_registries, as: 'deviceRegistries', class: Google::Apis::CloudiotV1beta1::DeviceRegistry, decorator: Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListDevicesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :devices, as: 'devices', class: Google::Apis::CloudiotV1beta1::Device, decorator: Google::Apis::CloudiotV1beta1::Device::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ModifyCloudToDeviceConfigRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data', class: Google::Apis::CloudiotV1beta1::DeviceConfigData, decorator: Google::Apis::CloudiotV1beta1::DeviceConfigData::Representation + + property :version_to_update, :numeric_string => true, as: 'versionToUpdate' + end + end + + class MqttConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :mqtt_config_state, as: 'mqttConfigState' + end + end + + class NotificationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pubsub_topic_name, as: 'pubsubTopicName' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudiotV1beta1::AuditConfig, decorator: Google::Apis::CloudiotV1beta1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::CloudiotV1beta1::Binding, decorator: Google::Apis::CloudiotV1beta1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :iam_owned, as: 'iamOwned' + property :version, as: 'version' + end + end + + class PublicKeyCredential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format' + property :key, as: 'key' + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudiotV1beta1::Policy, decorator: Google::Apis::CloudiotV1beta1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + end + end +end diff --git a/generated/google/apis/cloudiot_v1beta1/service.rb b/generated/google/apis/cloudiot_v1beta1/service.rb new file mode 100644 index 000000000..f08595f75 --- /dev/null +++ b/generated/google/apis/cloudiot_v1beta1/service.rb @@ -0,0 +1,725 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module CloudiotV1beta1 + # Google Cloud IoT API + # + # Registers and manages IoT (Internet of Things) devices that connect to the + # Google Cloud Platform. + # + # @example + # require 'google/apis/cloudiot_v1beta1' + # + # Cloudiot = Google::Apis::CloudiotV1beta1 # Alias the module + # service = Cloudiot::CloudIotService.new + # + # @see https://cloud.google.com/iot + class CloudIotService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://cloudiot.googleapis.com/', '') + @batch_path = 'batch' + end + + # Creates a device registry that contains devices. + # @param [String] parent + # The project and cloud region where this device registry must be created. + # For example, `projects/example-project/locations/us-central1`. + # @param [Google::Apis::CloudiotV1beta1::DeviceRegistry] device_registry_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_registry(parent, device_registry_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/registries', options) + command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + command.request_object = device_registry_object + command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a device registry configuration. + # @param [String] name + # The name of the device registry. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a device registry configuration. + # @param [String] name + # The name of the device registry. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_registry(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1beta1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_registry_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudiotV1beta1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists device registries. + # @param [String] parent + # The project and cloud region path. For example, + # `projects/example-project/locations/us-central1`. + # @param [Fixnum] page_size + # The maximum number of registries to return in the response. If this value + # is zero, the service will select a default size. A call may return fewer + # objects than requested, but if there is a non-empty `page_token`, it + # indicates that more entries are available. + # @param [String] page_token + # The value returned by the last `ListDeviceRegistriesResponse`; indicates + # that this is a continuation of a prior `ListDeviceRegistries` call, and + # that the system should return the next page of data. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registries(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/registries', options) + command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse::Representation + command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceRegistriesResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a device registry configuration. + # @param [String] name + # The resource path name. For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [Google::Apis::CloudiotV1beta1::DeviceRegistry] device_registry_object + # @param [String] update_mask + # Only updates the `device_registry` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # Mutable top-level fields: `event_notification_config` and `mqtt_config` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceRegistry] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::DeviceRegistry] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_registry(name, device_registry_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + command.request_object = device_registry_object + command.response_representation = Google::Apis::CloudiotV1beta1::DeviceRegistry::Representation + command.response_class = Google::Apis::CloudiotV1beta1::DeviceRegistry + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_registry_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudiotV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudiotV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_registry_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudiotV1beta1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a device in a device registry. + # @param [String] parent + # The name of the device registry where this device should be created. + # For example, + # `projects/example-project/locations/us-central1/registries/my-registry`. + # @param [Google::Apis::CloudiotV1beta1::Device] device_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_registry_device(parent, device_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/devices', options) + command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation + command.request_object = device_object + command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Device + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details about a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_registry_device(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Device + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the configuration of a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0`. + # @param [Fixnum] local_version + # If zero, returns the current device configuration from Cloud IoT Core. + # If nonzero, specifies the local version of the configuration on the device. + # The server returns config data only if a higher (newer) version is + # available from Cloud IoT Core. + # If this value is higher than the latest version available in Cloud IoT + # Core, returns an `OUT_OF_RANGE` error. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::HttpDeviceConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::HttpDeviceConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_registry_device_config(name, local_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/config', options) + command.response_representation = Google::Apis::CloudiotV1beta1::HttpDeviceConfig::Representation + command.response_class = Google::Apis::CloudiotV1beta1::HttpDeviceConfig + command.params['name'] = name unless name.nil? + command.query['localVersion'] = local_version unless local_version.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List devices in a device registry. + # @param [String] parent + # The device registry path. Required. For example, + # `projects/my-project/locations/us-central1/registries/my-registry`. + # @param [Array, String] device_ids + # A list of device string identifiers. If empty, it will ignore this field. + # For example, `['device0', 'device12']`. This field cannot hold more than + # 10,000 entries. + # @param [Array, Fixnum] device_num_ids + # A list of device numerical ids. If empty, it will ignore this field. This + # field cannot hold more than 10,000 entries. + # @param [String] field_mask + # The fields of the `Device` resource to be returned in the response. The + # fields `id`, and `num_id` are always returned by default, along with any + # other fields specified. + # @param [Fixnum] page_size + # The maximum number of devices to return in the response. If this value + # is zero, the service will select a default size. A call may return fewer + # objects than requested, but if there is a non-empty `page_token`, it + # indicates that more entries are available. + # @param [String] page_token + # The value returned by the last `ListDevicesResponse`; indicates + # that this is a continuation of a prior `ListDevices` call, and + # that the system should return the next page of data. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDevicesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::ListDevicesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registry_devices(parent, device_ids: nil, device_num_ids: nil, field_mask: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/devices', options) + command.response_representation = Google::Apis::CloudiotV1beta1::ListDevicesResponse::Representation + command.response_class = Google::Apis::CloudiotV1beta1::ListDevicesResponse + command.params['parent'] = parent unless parent.nil? + command.query['deviceIds'] = device_ids unless device_ids.nil? + command.query['deviceNumIds'] = device_num_ids unless device_num_ids.nil? + command.query['fieldMask'] = field_mask unless field_mask.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Modifies the configuration for the device, which is eventually sent from + # the Cloud IoT servers. Returns the modified configuration version and its + # meta-data. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [Google::Apis::CloudiotV1beta1::ModifyCloudToDeviceConfigRequest] modify_cloud_to_device_config_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::DeviceConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::DeviceConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def modify_cloud_to_device_config(name, modify_cloud_to_device_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:modifyCloudToDeviceConfig', options) + command.request_representation = Google::Apis::CloudiotV1beta1::ModifyCloudToDeviceConfigRequest::Representation + command.request_object = modify_cloud_to_device_config_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::DeviceConfig::Representation + command.response_class = Google::Apis::CloudiotV1beta1::DeviceConfig + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a device. + # @param [String] name + # The resource path name. For example, + # `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or + # `projects/p1/locations/us-central1/registries/registry0/devices/`num_id``. + # When `name` is populated as a response from the service, it always ends + # in the device numeric ID. + # @param [Google::Apis::CloudiotV1beta1::Device] device_object + # @param [String] update_mask + # Only updates the `device` fields indicated by this mask. + # The field mask must not be empty, and it must not contain fields that + # are immutable or only set by the server. + # Mutable top-level fields: `credentials` and `enabled_state` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Device] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Device] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_registry_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::CloudiotV1beta1::Device::Representation + command.request_object = device_object + command.response_representation = Google::Apis::CloudiotV1beta1::Device::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Device + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Publishes a telemetry event for a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0`. + # @param [Google::Apis::CloudiotV1beta1::HttpPublishEventRequest] http_publish_event_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::HttpPublishEventResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::HttpPublishEventResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def publish_project_location_registry_device_event(name, http_publish_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:publishEvent', options) + command.request_representation = Google::Apis::CloudiotV1beta1::HttpPublishEventRequest::Representation + command.request_object = http_publish_event_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::HttpPublishEventResponse::Representation + command.response_class = Google::Apis::CloudiotV1beta1::HttpPublishEventResponse + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the state of a device. + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0`. + # @param [Google::Apis::CloudiotV1beta1::HttpSetDeviceStateRequest] http_set_device_state_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_project_location_registry_device_state(name, http_set_device_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:setState', options) + command.request_representation = Google::Apis::CloudiotV1beta1::HttpSetDeviceStateRequest::Representation + command.request_object = http_set_device_state_request_object + command.response_representation = Google::Apis::CloudiotV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudiotV1beta1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the last few versions of the device configuration in descending + # order (i.e.: newest first). + # @param [String] name + # The name of the device. For example, + # `projects/p0/locations/us-central1/registries/registry0/devices/device0` or + # `projects/p0/locations/us-central1/registries/registry0/devices/`num_id``. + # @param [Fixnum] num_versions + # The number of versions to list. Versions are listed in decreasing order of + # the version number. The maximum number of versions retained is 10. If this + # value is zero, it will return all the versions available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_registry_device_config_versions(name, num_versions: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/configVersions', options) + command.response_representation = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse::Representation + command.response_class = Google::Apis::CloudiotV1beta1::ListDeviceConfigVersionsResponse + command.params['name'] = name unless name.nil? + command.query['numVersions'] = num_versions unless num_versions.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/cloudmonitoring_v2beta2/service.rb b/generated/google/apis/cloudmonitoring_v2beta2/service.rb index 077df06e5..5d0b53e79 100644 --- a/generated/google/apis/cloudmonitoring_v2beta2/service.rb +++ b/generated/google/apis/cloudmonitoring_v2beta2/service.rb @@ -50,7 +50,7 @@ module Google def initialize super('https://www.googleapis.com/', 'cloudmonitoring/v2beta2/projects/') - @batch_path = 'batch/cloudmonitoring/v2beta2' + @batch_path = 'batch' end # Create a new metric. diff --git a/generated/google/apis/container_v1.rb b/generated/google/apis/container_v1.rb index c3edacfe1..bd4a6d6d9 100644 --- a/generated/google/apis/container_v1.rb +++ b/generated/google/apis/container_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1 VERSION = 'V1' - REVISION = '20170908' + REVISION = '20170915' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/container_v1/classes.rb b/generated/google/apis/container_v1/classes.rb index aabf378e1..ed085e3f1 100644 --- a/generated/google/apis/container_v1/classes.rb +++ b/generated/google/apis/container_v1/classes.rb @@ -71,6 +71,13 @@ module Google # @return [Google::Apis::ContainerV1::KubernetesDashboard] attr_accessor :kubernetes_dashboard + # Configuration for NetworkPolicy. This only tracks whether the addon + # is enabled or not on the Master, it does not track whether network policy + # is enabled for the nodes. + # Corresponds to the JSON property `networkPolicyConfig` + # @return [Google::Apis::ContainerV1::NetworkPolicyConfig] + attr_accessor :network_policy_config + def initialize(**args) update!(**args) end @@ -80,6 +87,7 @@ module Google @horizontal_pod_autoscaling = args[:horizontal_pod_autoscaling] if args.key?(:horizontal_pod_autoscaling) @http_load_balancing = args[:http_load_balancing] if args.key?(:http_load_balancing) @kubernetes_dashboard = args[:kubernetes_dashboard] if args.key?(:kubernetes_dashboard) + @network_policy_config = args[:network_policy_config] if args.key?(:network_policy_config) end end @@ -1099,6 +1107,28 @@ module Google end end + # Configuration for NetworkPolicy. This only tracks whether the addon + # is enabled or not on the Master, it does not track whether network policy + # is enabled for the nodes. + class NetworkPolicyConfig + include Google::Apis::Core::Hashable + + # Whether NetworkPolicy is enabled for this cluster. + # Corresponds to the JSON property `disabled` + # @return [Boolean] + attr_accessor :disabled + alias_method :disabled?, :disabled + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @disabled = args[:disabled] if args.key?(:disabled) + end + end + # Parameters that describe the nodes in a cluster. class NodeConfig include Google::Apis::Core::Hashable @@ -1167,13 +1197,13 @@ module Google # @return [Hash] attr_accessor :metadata - # Minimum cpu/platform to be used by this instance. The instance may be - # scheduled on the specified or newer cpu/platform. Applicable values are the + # Minimum CPU platform to be used by this instance. The instance may be + # scheduled on the specified or newer CPU platform. Applicable values are the # friendly names of CPU platforms, such as # minCpuPlatform: "Intel Haswell" or # minCpuPlatform: "Intel Sandy Bridge". For more - # information, read - # Specifying a Minimum CPU Platform. + # information, read [how to specify min CPU platform](https://cloud.google.com/ + # compute/docs/instances/specify-min-cpu-platform) # Corresponds to the JSON property `minCpuPlatform` # @return [String] attr_accessor :min_cpu_platform diff --git a/generated/google/apis/container_v1/representations.rb b/generated/google/apis/container_v1/representations.rb index c5a3b8695..da564af3b 100644 --- a/generated/google/apis/container_v1/representations.rb +++ b/generated/google/apis/container_v1/representations.rb @@ -178,6 +178,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class NetworkPolicyConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class NodeConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -333,6 +339,8 @@ module Google property :kubernetes_dashboard, as: 'kubernetesDashboard', class: Google::Apis::ContainerV1::KubernetesDashboard, decorator: Google::Apis::ContainerV1::KubernetesDashboard::Representation + property :network_policy_config, as: 'networkPolicyConfig', class: Google::Apis::ContainerV1::NetworkPolicyConfig, decorator: Google::Apis::ContainerV1::NetworkPolicyConfig::Representation + end end @@ -586,6 +594,13 @@ module Google end end + class NetworkPolicyConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :disabled, as: 'disabled' + end + end + class NodeConfig # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/container_v1beta1.rb b/generated/google/apis/container_v1beta1.rb index eeaaea9d1..b99eac9de 100644 --- a/generated/google/apis/container_v1beta1.rb +++ b/generated/google/apis/container_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1beta1 VERSION = 'V1beta1' - REVISION = '20170908' + REVISION = '20170915' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/container_v1beta1/classes.rb b/generated/google/apis/container_v1beta1/classes.rb index c62d30dd1..dec3c30f4 100644 --- a/generated/google/apis/container_v1beta1/classes.rb +++ b/generated/google/apis/container_v1beta1/classes.rb @@ -71,6 +71,13 @@ module Google # @return [Google::Apis::ContainerV1beta1::KubernetesDashboard] attr_accessor :kubernetes_dashboard + # Configuration for NetworkPolicy. This only tracks whether the addon + # is enabled or not on the Master, it does not track whether network policy + # is enabled for the nodes. + # Corresponds to the JSON property `networkPolicyConfig` + # @return [Google::Apis::ContainerV1beta1::NetworkPolicyConfig] + attr_accessor :network_policy_config + def initialize(**args) update!(**args) end @@ -80,6 +87,7 @@ module Google @horizontal_pod_autoscaling = args[:horizontal_pod_autoscaling] if args.key?(:horizontal_pod_autoscaling) @http_load_balancing = args[:http_load_balancing] if args.key?(:http_load_balancing) @kubernetes_dashboard = args[:kubernetes_dashboard] if args.key?(:kubernetes_dashboard) + @network_policy_config = args[:network_policy_config] if args.key?(:network_policy_config) end end @@ -1176,6 +1184,28 @@ module Google end end + # Configuration for NetworkPolicy. This only tracks whether the addon + # is enabled or not on the Master, it does not track whether network policy + # is enabled for the nodes. + class NetworkPolicyConfig + include Google::Apis::Core::Hashable + + # Whether NetworkPolicy is enabled for this cluster. + # Corresponds to the JSON property `disabled` + # @return [Boolean] + attr_accessor :disabled + alias_method :disabled?, :disabled + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @disabled = args[:disabled] if args.key?(:disabled) + end + end + # Parameters that describe the nodes in a cluster. class NodeConfig include Google::Apis::Core::Hashable @@ -1244,13 +1274,13 @@ module Google # @return [Hash] attr_accessor :metadata - # Minimum cpu/platform to be used by this instance. The instance may be - # scheduled on the specified or newer cpu/platform. Applicable values are the + # Minimum CPU platform to be used by this instance. The instance may be + # scheduled on the specified or newer CPU platform. Applicable values are the # friendly names of CPU platforms, such as # minCpuPlatform: "Intel Haswell" or # minCpuPlatform: "Intel Sandy Bridge". For more - # information, read - # Specifying a Minimum CPU Platform. + # information, read [how to specify min CPU platform](https://cloud.google.com/ + # compute/docs/instances/specify-min-cpu-platform) # Corresponds to the JSON property `minCpuPlatform` # @return [String] attr_accessor :min_cpu_platform diff --git a/generated/google/apis/container_v1beta1/representations.rb b/generated/google/apis/container_v1beta1/representations.rb index dc61606a1..da5cf4549 100644 --- a/generated/google/apis/container_v1beta1/representations.rb +++ b/generated/google/apis/container_v1beta1/representations.rb @@ -172,6 +172,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class NetworkPolicyConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class NodeConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -285,6 +291,8 @@ module Google property :kubernetes_dashboard, as: 'kubernetesDashboard', class: Google::Apis::ContainerV1beta1::KubernetesDashboard, decorator: Google::Apis::ContainerV1beta1::KubernetesDashboard::Representation + property :network_policy_config, as: 'networkPolicyConfig', class: Google::Apis::ContainerV1beta1::NetworkPolicyConfig, decorator: Google::Apis::ContainerV1beta1::NetworkPolicyConfig::Representation + end end @@ -543,6 +551,13 @@ module Google end end + class NetworkPolicyConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :disabled, as: 'disabled' + end + end + class NodeConfig # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/iam_v1.rb b/generated/google/apis/iam_v1.rb index bda91dc8f..41884af9d 100644 --- a/generated/google/apis/iam_v1.rb +++ b/generated/google/apis/iam_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/iam/ module IamV1 VERSION = 'V1' - REVISION = '20170811' + REVISION = '20170922' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iam_v1/classes.rb b/generated/google/apis/iam_v1/classes.rb index fd3c94fe6..64dae1fc0 100644 --- a/generated/google/apis/iam_v1/classes.rb +++ b/generated/google/apis/iam_v1/classes.rb @@ -201,12 +201,12 @@ module Google # `unique_id`. # If the account already exists, the account's resource name is returned # in util::Status's ResourceInfo.resource_name in the format of - # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can + # projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT`. The caller can # use the name in other methods to access the account. # All other methods can identify the service account using the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # Corresponds to the JSON property `serviceAccount` # @return [Google::Apis::IamV1::ServiceAccount] @@ -695,12 +695,12 @@ module Google # `unique_id`. # If the account already exists, the account's resource name is returned # in util::Status's ResourceInfo.resource_name in the format of - # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can + # projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT`. The caller can # use the name in other methods to access the account. # All other methods can identify the service account using the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. class ServiceAccount include Google::Apis::Core::Hashable @@ -723,12 +723,12 @@ module Google attr_accessor :etag # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Requests using `-` as a wildcard for the project will infer the project - # from the `account` and the `account` value can be the `email` address or - # the `unique_id` of the service account. + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Requests using `-` as a wildcard for the `PROJECT_ID` will infer the + # project from the `account` and the `ACCOUNT` value can be the `email` + # address or the `unique_id` of the service account. # In responses the resource name will always be in the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name @@ -787,7 +787,7 @@ module Google attr_accessor :key_algorithm # The resource name of the service account key in the following format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT`/keys/`key``. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/iam_v1/service.rb b/generated/google/apis/iam_v1/service.rb index 5813ce451..0e9765182 100644 --- a/generated/google/apis/iam_v1/service.rb +++ b/generated/google/apis/iam_v1/service.rb @@ -574,9 +574,9 @@ module Google # Deletes a ServiceAccount. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -608,9 +608,9 @@ module Google # Gets a ServiceAccount. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -750,9 +750,9 @@ module Google # Signs a blob using a service account's system-managed private key. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [Google::Apis::IamV1::SignBlobRequest] sign_blob_request_object # @param [String] fields @@ -790,9 +790,9 @@ module Google # more than one hour, the request will fail. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [Google::Apis::IamV1::SignJwtRequest] sign_jwt_request_object # @param [String] fields @@ -865,12 +865,12 @@ module Google # The `etag` is mandatory. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Requests using `-` as a wildcard for the project will infer the project - # from the `account` and the `account` value can be the `email` address or - # the `unique_id` of the service account. + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Requests using `-` as a wildcard for the `PROJECT_ID` will infer the + # project from the `account` and the `ACCOUNT` value can be the `email` + # address or the `unique_id` of the service account. # In responses the resource name will always be in the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. # @param [Google::Apis::IamV1::ServiceAccount] service_account_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -905,9 +905,9 @@ module Google # and returns it. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [Google::Apis::IamV1::CreateServiceAccountKeyRequest] create_service_account_key_request_object # @param [String] fields @@ -942,9 +942,9 @@ module Google # Deletes a ServiceAccountKey. # @param [String] name # The resource name of the service account key in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT`/keys/`key``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -977,9 +977,9 @@ module Google # by key id. # @param [String] name # The resource name of the service account key in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT`/keys/`key``. + # Using `-` as a wildcard for the `PROJECT_ID` will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [String] public_key_type # The output format of the public key requested. @@ -1015,9 +1015,9 @@ module Google # Lists ServiceAccountKeys. # @param [String] name # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project, will infer the project from - # the account. The `account` value can be the `email` address or the + # `projects/`PROJECT_ID`/serviceAccounts/`ACCOUNT``. + # Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from + # the account. The `ACCOUNT` value can be the `email` address or the # `unique_id` of the service account. # @param [Array, String] key_types # Filters the types of keys the user wants to include in the list diff --git a/generated/google/apis/logging_v2.rb b/generated/google/apis/logging_v2.rb index 2f244be81..3f9cbdca0 100644 --- a/generated/google/apis/logging_v2.rb +++ b/generated/google/apis/logging_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2 VERSION = 'V2' - REVISION = '20170905' + REVISION = '20170926' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/logging_v2/classes.rb b/generated/google/apis/logging_v2/classes.rb index cbe899d75..19a6b8dec 100644 --- a/generated/google/apis/logging_v2/classes.rb +++ b/generated/google/apis/logging_v2/classes.rb @@ -625,15 +625,17 @@ module Google # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/ - # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must - # be less than 512 characters long and can only include the following characters: - # upper and lower case alphanumeric characters, forward-slash, underscore, - # hyphen, and period.For backward compatibility, if log_name begins with a - # forward-slash, such as /projects/..., then the log entry is ingested as usual - # but the forward-slash is removed. Listing the log entry will not show the - # leading slash and filtering for a log name with a leading slash will never - # return any results. + # A project number may optionally be used in place of PROJECT_ID. The project + # number is translated to its corresponding PROJECT_ID internally and the + # log_name field will contain PROJECT_ID in queries and exports.[LOG_ID] must be + # URL-encoded within log_name. Example: "organizations/1234567890/logs/ + # cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must be less than + # 512 characters long and can only include the following characters: upper and + # lower case alphanumeric characters, forward-slash, underscore, hyphen, and + # period.For backward compatibility, if log_name begins with a forward-slash, + # such as /projects/..., then the log entry is ingested as usual but the forward- + # slash is removed. Listing the log entry will not show the leading slash and + # filtering for a log name with a leading slash will never return any results. # Corresponds to the JSON property `logName` # @return [String] attr_accessor :log_name diff --git a/generated/google/apis/resourceviews_v1beta1/service.rb b/generated/google/apis/resourceviews_v1beta1/service.rb index ad2c56f26..efc1ee88d 100644 --- a/generated/google/apis/resourceviews_v1beta1/service.rb +++ b/generated/google/apis/resourceviews_v1beta1/service.rb @@ -51,7 +51,7 @@ module Google def initialize super('https://www.googleapis.com/', 'resourceviews/v1beta1/projects/') - @batch_path = 'batch/resourceviews/v1beta1' + @batch_path = 'batch' end # Add resources to the view. diff --git a/generated/google/apis/taskqueue_v1beta2/service.rb b/generated/google/apis/taskqueue_v1beta2/service.rb index 61eda38cf..212ad4616 100644 --- a/generated/google/apis/taskqueue_v1beta2/service.rb +++ b/generated/google/apis/taskqueue_v1beta2/service.rb @@ -50,7 +50,7 @@ module Google def initialize super('https://www.googleapis.com/', 'taskqueue/v1beta2/projects/') - @batch_path = 'batch/taskqueue/v1beta2' + @batch_path = 'batch' end # Get detailed information about a TaskQueue.