cloudiot.projects.locations.registries.bindDeviceToGateway

valid {
    input.Body.deviceId == STRING
    input.Body.gatewayId == STRING
    input.ReqMap.parent == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.create

enum_DeviceRegistryLogLevel := [ "LOG_LEVEL_UNSPECIFIED", "NONE", "ERROR", "INFO", "DEBUG" ]
enum_HttpConfigHttpEnabledState := [ "HTTP_STATE_UNSPECIFIED", "HTTP_ENABLED", "HTTP_DISABLED" ]
enum_MqttConfigMqttEnabledState := [ "MQTT_STATE_UNSPECIFIED", "MQTT_ENABLED", "MQTT_DISABLED" ]
enum_PublicKeyCertificateFormat := [ "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT", "X509_CERTIFICATE_PEM" ]

valid {
    input.Body.credentials[_].publicKeyCertificate.certificate == STRING
    input.Body.credentials[_].publicKeyCertificate.format == enum_PublicKeyCertificateFormat[_]
    input.Body.credentials[_].publicKeyCertificate.x509Details.expiryTime == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.issuer == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.publicKeyType == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.signatureAlgorithm == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.startTime == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.subject == STRING
    input.Body.eventNotificationConfigs[_].pubsubTopicName == STRING
    input.Body.eventNotificationConfigs[_].subfolderMatches == STRING
    input.Body.httpConfig.httpEnabledState == enum_HttpConfigHttpEnabledState[_]
    input.Body.id == STRING
    input.Body.logLevel == enum_DeviceRegistryLogLevel[_]
    input.Body.mqttConfig.mqttEnabledState == enum_MqttConfigMqttEnabledState[_]
    input.Body.name == STRING
    input.Body.stateNotificationConfig.pubsubTopicName == STRING
    input.ReqMap.parent == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.delete

valid {
    input.ReqMap.name == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.configVersions.list

valid {
    input.ReqMap.name == STRING
    input.Qs.numVersions == INTEGER
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.create

enum_DeviceLogLevel := [ "LOG_LEVEL_UNSPECIFIED", "NONE", "ERROR", "INFO", "DEBUG" ]
enum_GatewayConfigGatewayAuthMethod := [ "GATEWAY_AUTH_METHOD_UNSPECIFIED", "ASSOCIATION_ONLY", "DEVICE_AUTH_TOKEN_ONLY", "ASSOCIATION_AND_DEVICE_AUTH_TOKEN" ]
enum_GatewayConfigGatewayType := [ "GATEWAY_TYPE_UNSPECIFIED", "GATEWAY", "NON_GATEWAY" ]
enum_PublicKeyCredentialFormat := [ "UNSPECIFIED_PUBLIC_KEY_FORMAT", "RSA_PEM", "RSA_X509_PEM", "ES256_PEM", "ES256_X509_PEM" ]

valid {
    input.Body.blocked == BOOLEAN
    input.Body.config.binaryData == STRING
    input.Body.config.cloudUpdateTime == STRING
    input.Body.config.deviceAckTime == STRING
    input.Body.config.version == STRING
    input.Body.credentials[_].expirationTime == STRING
    input.Body.credentials[_].publicKey.format == enum_PublicKeyCredentialFormat[_]
    input.Body.credentials[_].publicKey.key == STRING
    input.Body.gatewayConfig.gatewayAuthMethod == enum_GatewayConfigGatewayAuthMethod[_]
    input.Body.gatewayConfig.gatewayType == enum_GatewayConfigGatewayType[_]
    input.Body.gatewayConfig.lastAccessedGatewayId == STRING
    input.Body.gatewayConfig.lastAccessedGatewayTime == STRING
    input.Body.id == STRING
    input.Body.lastConfigAckTime == STRING
    input.Body.lastConfigSendTime == STRING
    input.Body.lastErrorStatus.code == INTEGER
    input.Body.lastErrorStatus.details[_].STRING == ANY
    input.Body.lastErrorStatus.message == STRING
    input.Body.lastErrorTime == STRING
    input.Body.lastEventTime == STRING
    input.Body.lastHeartbeatTime == STRING
    input.Body.lastStateTime == STRING
    input.Body.logLevel == enum_DeviceLogLevel[_]
    input.Body.metadata.STRING == STRING
    input.Body.name == STRING
    input.Body.numId == STRING
    input.Body.state.binaryData == STRING
    input.Body.state.updateTime == STRING
    input.ReqMap.parent == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.delete

valid {
    input.ReqMap.name == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.get

valid {
    input.ReqMap.name == STRING
    input.Qs.fieldMask == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.list

enum_GatewayListOptions.gatewayTypeParameter := [ "GATEWAY_TYPE_UNSPECIFIED", "GATEWAY", "NON_GATEWAY" ]

valid {
    input.ReqMap.parent == STRING
    input.Qs.deviceIds == STRING
    input.Qs.deviceNumIds == STRING
    input.Qs.fieldMask == STRING
    input.Qs.gatewayListOptions.associationsDeviceId == STRING
    input.Qs.gatewayListOptions.associationsGatewayId == STRING
    input.Qs.gatewayListOptions.gatewayType == enum_GatewayListOptions.gatewayTypeParameter[_]
    input.Qs.pageSize == INTEGER
    input.Qs.pageToken == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig

valid {
    input.Body.binaryData == STRING
    input.Body.versionToUpdate == STRING
    input.ReqMap.name == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.patch

enum_DeviceLogLevel := [ "LOG_LEVEL_UNSPECIFIED", "NONE", "ERROR", "INFO", "DEBUG" ]
enum_GatewayConfigGatewayAuthMethod := [ "GATEWAY_AUTH_METHOD_UNSPECIFIED", "ASSOCIATION_ONLY", "DEVICE_AUTH_TOKEN_ONLY", "ASSOCIATION_AND_DEVICE_AUTH_TOKEN" ]
enum_GatewayConfigGatewayType := [ "GATEWAY_TYPE_UNSPECIFIED", "GATEWAY", "NON_GATEWAY" ]
enum_PublicKeyCredentialFormat := [ "UNSPECIFIED_PUBLIC_KEY_FORMAT", "RSA_PEM", "RSA_X509_PEM", "ES256_PEM", "ES256_X509_PEM" ]

valid {
    input.Body.blocked == BOOLEAN
    input.Body.config.binaryData == STRING
    input.Body.config.cloudUpdateTime == STRING
    input.Body.config.deviceAckTime == STRING
    input.Body.config.version == STRING
    input.Body.credentials[_].expirationTime == STRING
    input.Body.credentials[_].publicKey.format == enum_PublicKeyCredentialFormat[_]
    input.Body.credentials[_].publicKey.key == STRING
    input.Body.gatewayConfig.gatewayAuthMethod == enum_GatewayConfigGatewayAuthMethod[_]
    input.Body.gatewayConfig.gatewayType == enum_GatewayConfigGatewayType[_]
    input.Body.gatewayConfig.lastAccessedGatewayId == STRING
    input.Body.gatewayConfig.lastAccessedGatewayTime == STRING
    input.Body.id == STRING
    input.Body.lastConfigAckTime == STRING
    input.Body.lastConfigSendTime == STRING
    input.Body.lastErrorStatus.code == INTEGER
    input.Body.lastErrorStatus.details[_].STRING == ANY
    input.Body.lastErrorStatus.message == STRING
    input.Body.lastErrorTime == STRING
    input.Body.lastEventTime == STRING
    input.Body.lastHeartbeatTime == STRING
    input.Body.lastStateTime == STRING
    input.Body.logLevel == enum_DeviceLogLevel[_]
    input.Body.metadata.STRING == STRING
    input.Body.name == STRING
    input.Body.numId == STRING
    input.Body.state.binaryData == STRING
    input.Body.state.updateTime == STRING
    input.ReqMap.name == STRING
    input.Qs.updateMask == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.sendCommandToDevice

valid {
    input.Body.binaryData == STRING
    input.Body.subfolder == STRING
    input.ReqMap.name == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.devices.states.list

valid {
    input.ReqMap.name == STRING
    input.Qs.numStates == INTEGER
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.get

valid {
    input.ReqMap.name == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.getIamPolicy

valid {
    input.Body.options.requestedPolicyVersion == INTEGER
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.groups.devices.list

enum_GatewayListOptions.gatewayTypeParameter := [ "GATEWAY_TYPE_UNSPECIFIED", "GATEWAY", "NON_GATEWAY" ]

valid {
    input.ReqMap.parent == STRING
    input.Qs.deviceIds == STRING
    input.Qs.deviceNumIds == STRING
    input.Qs.fieldMask == STRING
    input.Qs.gatewayListOptions.associationsDeviceId == STRING
    input.Qs.gatewayListOptions.associationsGatewayId == STRING
    input.Qs.gatewayListOptions.gatewayType == enum_GatewayListOptions.gatewayTypeParameter[_]
    input.Qs.pageSize == INTEGER
    input.Qs.pageToken == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.groups.getIamPolicy

valid {
    input.Body.options.requestedPolicyVersion == INTEGER
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.groups.setIamPolicy

valid {
    input.Body.policy.bindings[_].condition.description == STRING
    input.Body.policy.bindings[_].condition.expression == STRING
    input.Body.policy.bindings[_].condition.location == STRING
    input.Body.policy.bindings[_].condition.title == STRING
    input.Body.policy.bindings[_].members[_] == STRING
    input.Body.policy.bindings[_].role == STRING
    input.Body.policy.etag == STRING
    input.Body.policy.version == INTEGER
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.groups.testIamPermissions

valid {
    input.Body.permissions[_] == STRING
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.list

valid {
    input.ReqMap.parent == STRING
    input.Qs.pageSize == INTEGER
    input.Qs.pageToken == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.patch

enum_DeviceRegistryLogLevel := [ "LOG_LEVEL_UNSPECIFIED", "NONE", "ERROR", "INFO", "DEBUG" ]
enum_HttpConfigHttpEnabledState := [ "HTTP_STATE_UNSPECIFIED", "HTTP_ENABLED", "HTTP_DISABLED" ]
enum_MqttConfigMqttEnabledState := [ "MQTT_STATE_UNSPECIFIED", "MQTT_ENABLED", "MQTT_DISABLED" ]
enum_PublicKeyCertificateFormat := [ "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT", "X509_CERTIFICATE_PEM" ]

valid {
    input.Body.credentials[_].publicKeyCertificate.certificate == STRING
    input.Body.credentials[_].publicKeyCertificate.format == enum_PublicKeyCertificateFormat[_]
    input.Body.credentials[_].publicKeyCertificate.x509Details.expiryTime == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.issuer == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.publicKeyType == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.signatureAlgorithm == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.startTime == STRING
    input.Body.credentials[_].publicKeyCertificate.x509Details.subject == STRING
    input.Body.eventNotificationConfigs[_].pubsubTopicName == STRING
    input.Body.eventNotificationConfigs[_].subfolderMatches == STRING
    input.Body.httpConfig.httpEnabledState == enum_HttpConfigHttpEnabledState[_]
    input.Body.id == STRING
    input.Body.logLevel == enum_DeviceRegistryLogLevel[_]
    input.Body.mqttConfig.mqttEnabledState == enum_MqttConfigMqttEnabledState[_]
    input.Body.name == STRING
    input.Body.stateNotificationConfig.pubsubTopicName == STRING
    input.ReqMap.name == STRING
    input.Qs.updateMask == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.setIamPolicy

valid {
    input.Body.policy.bindings[_].condition.description == STRING
    input.Body.policy.bindings[_].condition.expression == STRING
    input.Body.policy.bindings[_].condition.location == STRING
    input.Body.policy.bindings[_].condition.title == STRING
    input.Body.policy.bindings[_].members[_] == STRING
    input.Body.policy.bindings[_].role == STRING
    input.Body.policy.etag == STRING
    input.Body.policy.version == INTEGER
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.testIamPermissions

valid {
    input.Body.permissions[_] == STRING
    input.ReqMap.resource == STRING
    input.ProviderMetadata.Region == STRING
}

cloudiot.projects.locations.registries.unbindDeviceFromGateway

valid {
    input.Body.deviceId == STRING
    input.Body.gatewayId == STRING
    input.ReqMap.parent == STRING
    input.ProviderMetadata.Region == STRING
}