diff --git a/Makefile b/Makefile index 23dafb464..bba3a49c6 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ THIS_FILE := $(lastword $(MAKEFILE_LIST)) TMP_DIR := $(shell mktemp -d) REPO_PATH := github.com/hashicorp/watchtower +bootstrap: + go generate -tags tools tools/tools.go + ### oplog requires protoc-gen-go v1.20.0 or later # GO111MODULE=on go get -u github.com/golang/protobuf/protoc-gen-go@v1.40 proto: protolint protobuild cleanup diff --git a/buf.yaml b/buf.yaml index a3bc7becf..378ba9918 100644 --- a/buf.yaml +++ b/buf.yaml @@ -9,3 +9,9 @@ lint: ignore: - protoc-gen-swagger - google + ignore_only: + # These api enums break these lint checks in order to appear nice in swagger. + ENUM_VALUE_PREFIX: + - controller/api/view/v1/view.proto + ENUM_ZERO_VALUE_SUFFIX: + - controller/api/view/v1/view.proto \ No newline at end of file diff --git a/internal/gen/controller.swagger.json b/internal/gen/controller.swagger.json index cea428123..ac3f56e0f 100644 --- a/internal/gen/controller.swagger.json +++ b/internal/gen/controller.swagger.json @@ -1,15 +1,1114 @@ { "swagger": "2.0", "info": { - "title": "controller/api/v1/placeholder_service.proto", - "version": "version not set" + "title": "Controller API", + "description": "API for managing resources associated with Controllers.", + "version": "0.0.1" }, + "schemes": [ + "https", + "http" + ], "consumes": [ "application/json" ], "produces": [ "application/json" ], - "paths": {}, - "definitions": {} + "paths": { + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs": { + "get": { + "summary": "Gets a list of HostCatalogs", + "operationId": "HostCatalogService_ListHostCatalogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.ListHostCatalogsResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostCatalogService" + ] + }, + "post": { + "summary": "Creates a HostCatalog", + "description": "Creates a single host catalog under the specified org and project", + "operationId": "HostCatalogService_CreateHostCatalog", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + ], + "tags": [ + "controller.api.v1.HostCatalogService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets": { + "get": { + "summary": "List all HostSets under the specific catalog", + "operationId": "HostSetService_ListHostSets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.ListHostSetsResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + }, + "post": { + "summary": "Create a HostSet", + "operationId": "HostSetService_CreateHostSet", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}": { + "get": { + "summary": "Get a single HostSet", + "operationId": "HostSetService_GetHostSet", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + }, + "delete": { + "summary": "Delete a HostSet", + "operationId": "HostSetService_DeleteHostSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.DeleteHostSetResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + }, + "patch": { + "summary": "Update a HostSet", + "operationId": "HostSetService_UpdateHostSet", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:add-hosts": { + "post": { + "summary": "Adds existing Hosts to the Host Set", + "description": "Adds the hosts to this Host Set if possible. All hosts added must be a child of the same host catalog this host set is a child of.", + "operationId": "HostSetService_AddToHostSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.AddToHostSetResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:remove-hosts": { + "post": { + "summary": "Removes Hosts to the Host Set", + "description": "Removes the hosts from this Host Set if present. If it is not present then no action is taken and no error is returned.", + "operationId": "HostSetService_RemoveFromHostSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.RemoveFromHostSetResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "description": "This host set's id.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "controller.api.v1.HostSetService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts": { + "get": { + "summary": "List all Hosts for the specified catalog", + "operationId": "HostService_ListHosts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.ListHostsResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostService" + ] + }, + "post": { + "summary": "Create a single Host", + "operationId": "HostService_CreateHost", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + ], + "tags": [ + "controller.api.v1.HostService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}": { + "get": { + "summary": "Gets a single Host", + "operationId": "HostService_GetHost", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostService" + ] + }, + "delete": { + "summary": "Delete a Host", + "operationId": "HostService_DeleteHost", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.DeleteHostResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "controller.api.v1.HostService" + ] + }, + "patch": { + "summary": "Update a Host", + "operationId": "HostService_UpdateHost", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "host_catalog_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + ], + "tags": [ + "controller.api.v1.HostService" + ] + } + }, + "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}": { + "get": { + "summary": "Gets a single HostCatalog", + "description": "Get's a single Host Catalog with the provided identifier.", + "operationId": "HostCatalogService_GetHostCatalog", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "view", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + } + ], + "tags": [ + "controller.api.v1.HostCatalogService" + ] + }, + "delete": { + "summary": "Deletes a HostCatalog", + "operationId": "HostCatalogService_DeleteHostCatalog", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/controller.api.v1.DeleteHostCatalogResponse" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "controller.api.v1.HostCatalogService" + ] + }, + "patch": { + "summary": "Updates a HostCatalog", + "operationId": "HostCatalogService_UpdateHostCatalog", + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + ], + "tags": [ + "controller.api.v1.HostCatalogService" + ] + } + } + }, + "definitions": { + "controller.api.resource.v1.Ec2CatalogDetails": { + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The AWS regions from which this catalog will retrieve the EC2 instances." + }, + "access_key": { + "type": "string", + "description": "The access key used for authenticating with AWS when retrieving EC2 instance details." + }, + "secret_key": { + "type": "string", + "description": "Input only." + }, + "rotate": { + "type": "boolean", + "format": "boolean", + "description": "This value will never be returned in a response." + } + } + }, + "controller.api.resource.v1.Host": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "Output only.", + "readOnly": true + }, + "friendly_name": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time", + "description": "The time this host was created.\nOutput only.", + "readOnly": true + }, + "updated_time": { + "type": "string", + "format": "date-time", + "description": "The time this host was last updated.\nOutput only.", + "readOnly": true + }, + "disabled": { + "type": "boolean", + "format": "boolean", + "description": "Marks the host as disabled. Default is false." + }, + "address": { + "type": "string", + "description": "This field is required." + } + }, + "description": "Host contains all fields related to a Host resource." + }, + "controller.api.resource.v1.HostCatalog": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "Output only.", + "readOnly": true + }, + "friendly_name": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time", + "description": "The time this host_catalog was created.\nOutput only.", + "readOnly": true + }, + "updated_time": { + "type": "string", + "format": "date-time", + "description": "The time this host_catalog was last updated.\nOutput only.", + "readOnly": true + }, + "disabled": { + "type": "boolean", + "format": "boolean", + "description": "Marks the host_catalog as disabled. Default is false." + }, + "static_host_catalog_details": { + "$ref": "#/definitions/controller.api.resource.v1.StaticCatalogDetails" + }, + "ec2_host_catalog_details": { + "$ref": "#/definitions/controller.api.resource.v1.Ec2CatalogDetails" + }, + "type": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalogType" + } + }, + "description": "HostCatalog organizes Hosts into HostSets." + }, + "controller.api.resource.v1.HostCatalogType": { + "type": "string", + "enum": [ + "HOST_CATALOG_TYPE_UNSPECIFIED", + "HOST_CATALOG_TYPE_EC2", + "HOST_CATALOG_TYPE_STATIC" + ], + "default": "HOST_CATALOG_TYPE_UNSPECIFIED" + }, + "controller.api.resource.v1.HostSet": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "Output only.", + "readOnly": true + }, + "friendly_name": { + "type": "string" + }, + "created_time": { + "type": "string", + "format": "date-time", + "description": "The time this host_set was created.\nOutput only.", + "readOnly": true + }, + "updated_time": { + "type": "string", + "format": "date-time", + "description": "The time this host_set was last updated.\nOutput only.", + "readOnly": true + }, + "disabled": { + "type": "boolean", + "format": "boolean", + "description": "Marks the host_set as disabled. Default is false." + }, + "size": { + "type": "integer", + "format": "int32", + "description": "The total count of hosts in this host set\nOutput only.", + "readOnly": true + }, + "hosts": { + "type": "array", + "items": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + }, + "description": "A list of hosts in this host set.\nTODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts.\nOutput only.", + "readOnly": true + } + }, + "description": "HostSets are a collection of sets created and managed by a catalog." + }, + "controller.api.resource.v1.StaticCatalogDetails": { + "type": "object" + }, + "controller.api.v1.AddToHostSetResponse": { + "type": "object" + }, + "controller.api.v1.CreateHostCatalogResponse": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "controller.api.v1.CreateHostResponse": { + "type": "object", + "properties": { + "ref": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "controller.api.v1.CreateHostSetResponse": { + "type": "object", + "properties": { + "uri": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "controller.api.v1.DeleteHostCatalogResponse": { + "type": "object", + "properties": { + "existed": { + "type": "boolean", + "format": "boolean" + } + } + }, + "controller.api.v1.DeleteHostResponse": { + "type": "object", + "properties": { + "existed": { + "type": "boolean", + "format": "boolean" + } + } + }, + "controller.api.v1.DeleteHostSetResponse": { + "type": "object", + "properties": { + "existed": { + "type": "boolean", + "format": "boolean" + } + } + }, + "controller.api.v1.GetHostCatalogResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "controller.api.v1.GetHostResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "controller.api.v1.GetHostSetResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "controller.api.v1.ListHostCatalogsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + } + }, + "controller.api.v1.ListHostSetsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + } + }, + "controller.api.v1.ListHostsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + } + }, + "controller.api.v1.RemoveFromHostSetResponse": { + "type": "object" + }, + "controller.api.v1.UpdateHostCatalogResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostCatalog" + } + } + }, + "controller.api.v1.UpdateHostResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.Host" + } + } + }, + "controller.api.v1.UpdateHostSetResponse": { + "type": "object", + "properties": { + "item": { + "$ref": "#/definitions/controller.api.resource.v1.HostSet" + } + } + }, + "controller.api.view.v1.View": { + "type": "string", + "enum": [ + "BASIC", + "FULL" + ], + "default": "BASIC" + }, + "google.protobuf.FieldMask": { + "type": "object", + "properties": { + "paths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of field mask paths." + } + }, + "description": "paths: \"f.a\"\n paths: \"f.b.d\"\n\nHere `f` represents a field in some root message, `a` and `b`\nfields in the message found in `f`, and `d` a field found in the\nmessage in `f.b`.\n\nField masks are used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation.\nField masks also have a custom JSON encoding (see below).\n\n# Field Masks in Projections\n\nWhen used in the context of a projection, a response message or\nsub-message is filtered by the API to only contain those fields as\nspecified in the mask. For example, if the mask in the previous\nexample is applied to a response message as follows:\n\n f {\n a : 22\n b {\n d : 1\n x : 2\n }\n y : 13\n }\n z: 8\n\nThe result will not contain specific values for fields x,y and z\n(their value will be set to the default, and omitted in proto text\noutput):\n\n\n f {\n a : 22\n b {\n d : 1\n }\n }\n\nA repeated field is not allowed except at the last position of a\npaths string.\n\nIf a FieldMask object is not present in a get operation, the\noperation applies to all fields (as if a FieldMask of all fields\nhad been specified).\n\nNote that a field mask does not necessarily apply to the\ntop-level response message. In case of a REST get operation, the\nfield mask applies directly to the response, but in case of a REST\nlist operation, the mask instead applies to each individual message\nin the returned resource list. In case of a REST custom method,\nother definitions may be used. Where the mask applies will be\nclearly documented together with its declaration in the API. In\nany case, the effect on the returned resource/resources is required\nbehavior for APIs.\n\n# Field Masks in Update Operations\n\nA field mask in update operations specifies which fields of the\ntargeted resource are going to be updated. The API is required\nto only change the values of the fields as specified in the mask\nand leave the others untouched. If a resource is passed in to\ndescribe the updated values, the API ignores the values of all\nfields not covered by the mask.\n\nIf a repeated field is specified for an update operation, new values will\nbe appended to the existing repeated field in the target resource. Note that\na repeated field is only allowed in the last position of a `paths` string.\n\nIf a sub-message is specified in the last position of the field mask for an\nupdate operation, then new value will be merged into the existing sub-message\nin the target resource.\n\nFor example, given the target message:\n\n f {\n b {\n d: 1\n x: 2\n }\n c: [1]\n }\n\nAnd an update message:\n\n f {\n b {\n d: 10\n }\n c: [2]\n }\n\nthen if the field mask is:\n\n paths: [\"f.b\", \"f.c\"]\n\nthen the result will be:\n\n f {\n b {\n d: 10\n x: 2\n }\n c: [1, 2]\n }\n\nAn implementation may provide options to override this default behavior for\nrepeated and message fields.\n\nIn order to reset a field's value to the default, the field must\nbe in the mask and set to the default value in the provided resource.\nHence, in order to reset all fields of a resource, provide a default\ninstance of the resource and set all fields in the mask, or do\nnot provide a mask as described below.\n\nIf a field mask is not present on update, the operation applies to\nall fields (as if a field mask of all fields has been specified).\nNote that in the presence of schema evolution, this may mean that\nfields the client does not know and has therefore not filled into\nthe request will be reset to their default. If this is unwanted\nbehavior, a specific service may require a client to always specify\na field mask, producing an error if not.\n\nAs with get operations, the location of the resource which\ndescribes the updated values in the request message depends on the\noperation kind. In any case, the effect of the field mask is\nrequired to be honored by the API.\n\n## Considerations for HTTP REST\n\nThe HTTP kind of an update operation which uses a field mask must\nbe set to PATCH instead of PUT in order to satisfy HTTP semantics\n(PUT must only be used for full updates).\n\n# JSON Encoding of Field Masks\n\nIn JSON, a field mask is encoded as a single string where paths are\nseparated by a comma. Fields name in each path are converted\nto/from lower-camel naming conventions.\n\nAs an example, consider the following message declarations:\n\n message Profile {\n User user = 1;\n Photo photo = 2;\n }\n message User {\n string display_name = 1;\n string address = 2;\n }\n\nIn proto a field mask for `Profile` may look as such:\n\n mask {\n paths: \"user.display_name\"\n paths: \"photo\"\n }\n\nIn JSON, the same mask is represented as below:\n\n {\n mask: \"user.displayName,photo\"\n }\n\n# Field Masks and Oneof Fields\n\nField masks treat fields in oneofs just as regular fields. Consider the\nfollowing message:\n\n message SampleMessage {\n oneof test_oneof {\n string name = 4;\n SubMessage sub_message = 9;\n }\n }\n\nThe field mask can be:\n\n mask {\n paths: \"name\"\n }\n\nOr:\n\n mask {\n paths: \"sub_message\"\n }\n\nNote that oneof type names (\"test_oneof\" in this case) cannot be used in\npaths.\n\n## Field Mask Verification\n\nThe implementation of any API method which has a FieldMask type field in the\nrequest should verify the included field paths, and return an\n`INVALID_ARGUMENT` error if any path is unmappable.", + "title": "`FieldMask` represents a set of symbolic field paths, for example:" + } + } } diff --git a/internal/gen/controller/api/error.pb.go b/internal/gen/controller/api/error.pb.go new file mode 100644 index 000000000..ae965e88c --- /dev/null +++ b/internal/gen/controller/api/error.pb.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/v1/error.proto + +package api + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type ErrorDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TraceId string `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + RequestFields []string `protobuf:"bytes,3,rep,name=request_fields,json=requestFields,proto3" json:"request_fields,omitempty"` +} + +func (x *ErrorDetails) Reset() { + *x = ErrorDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorDetails) ProtoMessage() {} + +func (x *ErrorDetails) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_error_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrorDetails.ProtoReflect.Descriptor instead. +func (*ErrorDetails) Descriptor() ([]byte, []int) { + return file_controller_api_v1_error_proto_rawDescGZIP(), []int{0} +} + +func (x *ErrorDetails) GetTraceId() string { + if x != nil { + return x.TraceId + } + return "" +} + +func (x *ErrorDetails) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *ErrorDetails) GetRequestFields() []string { + if x != nil { + return x.RequestFields + } + return nil +} + +// Error is returned by the JSON API when an error occurs. +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP Status code applicable to this error. + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + // An application-specific error string. + Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` + // A human readable explanation specific to this occurrence of the error. + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` + // Additional metadata regarding the error. Depending on the error different fields will be populated. + Details *ErrorDetails `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_error_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_error_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_controller_api_v1_error_proto_rawDescGZIP(), []int{1} +} + +func (x *Error) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *Error) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Error) GetDetails() *ErrorDetails { + if x != nil { + return x.Details + } + return nil +} + +var File_controller_api_v1_error_proto protoreflect.FileDescriptor + +var file_controller_api_v1_error_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x22, 0x6f, 0x0a, 0x0c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x41, + 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, + 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_v1_error_proto_rawDescOnce sync.Once + file_controller_api_v1_error_proto_rawDescData = file_controller_api_v1_error_proto_rawDesc +) + +func file_controller_api_v1_error_proto_rawDescGZIP() []byte { + file_controller_api_v1_error_proto_rawDescOnce.Do(func() { + file_controller_api_v1_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_v1_error_proto_rawDescData) + }) + return file_controller_api_v1_error_proto_rawDescData +} + +var file_controller_api_v1_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_controller_api_v1_error_proto_goTypes = []interface{}{ + (*ErrorDetails)(nil), // 0: controller.api.v1.ErrorDetails + (*Error)(nil), // 1: controller.api.v1.Error +} +var file_controller_api_v1_error_proto_depIdxs = []int32{ + 0, // 0: controller.api.v1.Error.details:type_name -> controller.api.v1.ErrorDetails + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_controller_api_v1_error_proto_init() } +func file_controller_api_v1_error_proto_init() { + if File_controller_api_v1_error_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_v1_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrorDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_v1_error_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_v1_error_proto_goTypes, + DependencyIndexes: file_controller_api_v1_error_proto_depIdxs, + MessageInfos: file_controller_api_v1_error_proto_msgTypes, + }.Build() + File_controller_api_v1_error_proto = out.File + file_controller_api_v1_error_proto_rawDesc = nil + file_controller_api_v1_error_proto_goTypes = nil + file_controller_api_v1_error_proto_depIdxs = nil +} diff --git a/internal/gen/controller/api/host_catalog_service.pb.go b/internal/gen/controller/api/host_catalog_service.pb.go new file mode 100644 index 000000000..6ead26c01 --- /dev/null +++ b/internal/gen/controller/api/host_catalog_service.pb.go @@ -0,0 +1,1227 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/v1/host_catalog_service.proto + +package api + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + resource "github.com/hashicorp/watchtower/internal/gen/controller/api/resource" + view "github.com/hashicorp/watchtower/internal/gen/controller/api/view" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GetHostCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + View view.View `protobuf:"varint,4,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *GetHostCatalogRequest) Reset() { + *x = GetHostCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostCatalogRequest) ProtoMessage() {} + +func (x *GetHostCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostCatalogRequest.ProtoReflect.Descriptor instead. +func (*GetHostCatalogRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetHostCatalogRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *GetHostCatalogRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetHostCatalogRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetHostCatalogRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type GetHostCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.HostCatalog `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *GetHostCatalogResponse) Reset() { + *x = GetHostCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostCatalogResponse) ProtoMessage() {} + +func (x *GetHostCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostCatalogResponse.ProtoReflect.Descriptor instead. +func (*GetHostCatalogResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetHostCatalogResponse) GetItem() *resource.HostCatalog { + if x != nil { + return x.Item + } + return nil +} + +type ListHostCatalogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + View view.View `protobuf:"varint,3,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *ListHostCatalogsRequest) Reset() { + *x = ListHostCatalogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostCatalogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostCatalogsRequest) ProtoMessage() {} + +func (x *ListHostCatalogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostCatalogsRequest.ProtoReflect.Descriptor instead. +func (*ListHostCatalogsRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListHostCatalogsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListHostCatalogsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListHostCatalogsRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type ListHostCatalogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*resource.HostCatalog `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListHostCatalogsResponse) Reset() { + *x = ListHostCatalogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostCatalogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostCatalogsResponse) ProtoMessage() {} + +func (x *ListHostCatalogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostCatalogsResponse.ProtoReflect.Descriptor instead. +func (*ListHostCatalogsResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListHostCatalogsResponse) GetItems() []*resource.HostCatalog { + if x != nil { + return x.Items + } + return nil +} + +type CreateHostCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Item *resource.HostCatalog `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostCatalogRequest) Reset() { + *x = CreateHostCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostCatalogRequest) ProtoMessage() {} + +func (x *CreateHostCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostCatalogRequest.ProtoReflect.Descriptor instead. +func (*CreateHostCatalogRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateHostCatalogRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CreateHostCatalogRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateHostCatalogRequest) GetItem() *resource.HostCatalog { + if x != nil { + return x.Item + } + return nil +} + +type CreateHostCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Item *resource.HostCatalog `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostCatalogResponse) Reset() { + *x = CreateHostCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostCatalogResponse) ProtoMessage() {} + +func (x *CreateHostCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostCatalogResponse.ProtoReflect.Descriptor instead. +func (*CreateHostCatalogResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateHostCatalogResponse) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *CreateHostCatalogResponse) GetItem() *resource.HostCatalog { + if x != nil { + return x.Item + } + return nil +} + +type UpdateHostCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` + Item *resource.HostCatalog `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"` + UpdateMask *field_mask.FieldMask `protobuf:"bytes,5,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateHostCatalogRequest) Reset() { + *x = UpdateHostCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostCatalogRequest) ProtoMessage() {} + +func (x *UpdateHostCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostCatalogRequest.ProtoReflect.Descriptor instead. +func (*UpdateHostCatalogRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateHostCatalogRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UpdateHostCatalogRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateHostCatalogRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateHostCatalogRequest) GetItem() *resource.HostCatalog { + if x != nil { + return x.Item + } + return nil +} + +func (x *UpdateHostCatalogRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateHostCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.HostCatalog `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *UpdateHostCatalogResponse) Reset() { + *x = UpdateHostCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostCatalogResponse) ProtoMessage() {} + +func (x *UpdateHostCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostCatalogResponse.ProtoReflect.Descriptor instead. +func (*UpdateHostCatalogResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateHostCatalogResponse) GetItem() *resource.HostCatalog { + if x != nil { + return x.Item + } + return nil +} + +type DeleteHostCatalogRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteHostCatalogRequest) Reset() { + *x = DeleteHostCatalogRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostCatalogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostCatalogRequest) ProtoMessage() {} + +func (x *DeleteHostCatalogRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostCatalogRequest.ProtoReflect.Descriptor instead. +func (*DeleteHostCatalogRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteHostCatalogRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DeleteHostCatalogRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteHostCatalogRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteHostCatalogResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Existed bool `protobuf:"varint,1,opt,name=existed,proto3" json:"existed,omitempty"` +} + +func (x *DeleteHostCatalogResponse) Reset() { + *x = DeleteHostCatalogResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostCatalogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostCatalogResponse) ProtoMessage() {} + +func (x *DeleteHostCatalogResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_catalog_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostCatalogResponse.ProtoReflect.Descriptor instead. +func (*DeleteHostCatalogResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_catalog_service_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteHostCatalogResponse) GetExisted() bool { + if x != nil { + return x.Existed + } + return false +} + +var File_controller_api_v1_host_catalog_service_proto protoreflect.FileDescriptor + +var file_controller_api_v1_host_catalog_service_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, + 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x69, 0x65, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x8f, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, + 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x30, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, + 0x69, 0x65, 0x77, 0x22, 0x55, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x81, 0x01, 0x0a, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, + 0x76, 0x69, 0x65, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x59, + 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x6a, 0x0a, 0x19, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xda, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x22, 0x58, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3b, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x60, 0x0a, 0x18, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x35, + 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x32, 0x86, 0x0a, 0x0a, 0x12, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89, 0x02, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, + 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x3a, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, + 0x41, 0x56, 0x12, 0x19, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x1a, 0x39, 0x47, + 0x65, 0x74, 0x27, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x48, 0x6f, + 0x73, 0x74, 0x20, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x12, 0xca, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x2a, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x92, 0x41, 0x1d, 0x12, 0x1b, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x97, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x2b, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, + 0x35, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x92, 0x41, 0x5a, 0x12, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, + 0x20, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x1a, 0x41, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x68, + 0x6f, 0x73, 0x74, 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x20, 0x75, 0x6e, 0x64, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, + 0x6f, 0x72, 0x67, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0xd8, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x32, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, + 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x92, 0x41, 0x17, 0x12, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x48, + 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0xcc, 0x01, 0x0a, 0x11, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3c, 0x2a, 0x3a, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, + 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, + 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x92, + 0x41, 0x17, 0x12, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x48, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x1a, 0x53, 0x92, 0x41, 0x50, 0x12, 0x4e, + 0x54, 0x68, 0x65, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, + 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x74, 0x2f, 0x6d, 0x75, 0x74, 0x61, 0x74, + 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x42, 0x41, + 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, + 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_v1_host_catalog_service_proto_rawDescOnce sync.Once + file_controller_api_v1_host_catalog_service_proto_rawDescData = file_controller_api_v1_host_catalog_service_proto_rawDesc +) + +func file_controller_api_v1_host_catalog_service_proto_rawDescGZIP() []byte { + file_controller_api_v1_host_catalog_service_proto_rawDescOnce.Do(func() { + file_controller_api_v1_host_catalog_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_v1_host_catalog_service_proto_rawDescData) + }) + return file_controller_api_v1_host_catalog_service_proto_rawDescData +} + +var file_controller_api_v1_host_catalog_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_controller_api_v1_host_catalog_service_proto_goTypes = []interface{}{ + (*GetHostCatalogRequest)(nil), // 0: controller.api.v1.GetHostCatalogRequest + (*GetHostCatalogResponse)(nil), // 1: controller.api.v1.GetHostCatalogResponse + (*ListHostCatalogsRequest)(nil), // 2: controller.api.v1.ListHostCatalogsRequest + (*ListHostCatalogsResponse)(nil), // 3: controller.api.v1.ListHostCatalogsResponse + (*CreateHostCatalogRequest)(nil), // 4: controller.api.v1.CreateHostCatalogRequest + (*CreateHostCatalogResponse)(nil), // 5: controller.api.v1.CreateHostCatalogResponse + (*UpdateHostCatalogRequest)(nil), // 6: controller.api.v1.UpdateHostCatalogRequest + (*UpdateHostCatalogResponse)(nil), // 7: controller.api.v1.UpdateHostCatalogResponse + (*DeleteHostCatalogRequest)(nil), // 8: controller.api.v1.DeleteHostCatalogRequest + (*DeleteHostCatalogResponse)(nil), // 9: controller.api.v1.DeleteHostCatalogResponse + (view.View)(0), // 10: controller.api.view.v1.View + (*resource.HostCatalog)(nil), // 11: controller.api.resource.v1.HostCatalog + (*field_mask.FieldMask)(nil), // 12: google.protobuf.FieldMask +} +var file_controller_api_v1_host_catalog_service_proto_depIdxs = []int32{ + 10, // 0: controller.api.v1.GetHostCatalogRequest.view:type_name -> controller.api.view.v1.View + 11, // 1: controller.api.v1.GetHostCatalogResponse.item:type_name -> controller.api.resource.v1.HostCatalog + 10, // 2: controller.api.v1.ListHostCatalogsRequest.view:type_name -> controller.api.view.v1.View + 11, // 3: controller.api.v1.ListHostCatalogsResponse.items:type_name -> controller.api.resource.v1.HostCatalog + 11, // 4: controller.api.v1.CreateHostCatalogRequest.item:type_name -> controller.api.resource.v1.HostCatalog + 11, // 5: controller.api.v1.CreateHostCatalogResponse.item:type_name -> controller.api.resource.v1.HostCatalog + 11, // 6: controller.api.v1.UpdateHostCatalogRequest.item:type_name -> controller.api.resource.v1.HostCatalog + 12, // 7: controller.api.v1.UpdateHostCatalogRequest.update_mask:type_name -> google.protobuf.FieldMask + 11, // 8: controller.api.v1.UpdateHostCatalogResponse.item:type_name -> controller.api.resource.v1.HostCatalog + 0, // 9: controller.api.v1.HostCatalogService.GetHostCatalog:input_type -> controller.api.v1.GetHostCatalogRequest + 2, // 10: controller.api.v1.HostCatalogService.ListHostCatalogs:input_type -> controller.api.v1.ListHostCatalogsRequest + 4, // 11: controller.api.v1.HostCatalogService.CreateHostCatalog:input_type -> controller.api.v1.CreateHostCatalogRequest + 6, // 12: controller.api.v1.HostCatalogService.UpdateHostCatalog:input_type -> controller.api.v1.UpdateHostCatalogRequest + 8, // 13: controller.api.v1.HostCatalogService.DeleteHostCatalog:input_type -> controller.api.v1.DeleteHostCatalogRequest + 1, // 14: controller.api.v1.HostCatalogService.GetHostCatalog:output_type -> controller.api.v1.GetHostCatalogResponse + 3, // 15: controller.api.v1.HostCatalogService.ListHostCatalogs:output_type -> controller.api.v1.ListHostCatalogsResponse + 5, // 16: controller.api.v1.HostCatalogService.CreateHostCatalog:output_type -> controller.api.v1.CreateHostCatalogResponse + 7, // 17: controller.api.v1.HostCatalogService.UpdateHostCatalog:output_type -> controller.api.v1.UpdateHostCatalogResponse + 9, // 18: controller.api.v1.HostCatalogService.DeleteHostCatalog:output_type -> controller.api.v1.DeleteHostCatalogResponse + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_controller_api_v1_host_catalog_service_proto_init() } +func file_controller_api_v1_host_catalog_service_proto_init() { + if File_controller_api_v1_host_catalog_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_v1_host_catalog_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostCatalogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostCatalogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_catalog_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_v1_host_catalog_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_controller_api_v1_host_catalog_service_proto_goTypes, + DependencyIndexes: file_controller_api_v1_host_catalog_service_proto_depIdxs, + MessageInfos: file_controller_api_v1_host_catalog_service_proto_msgTypes, + }.Build() + File_controller_api_v1_host_catalog_service_proto = out.File + file_controller_api_v1_host_catalog_service_proto_rawDesc = nil + file_controller_api_v1_host_catalog_service_proto_goTypes = nil + file_controller_api_v1_host_catalog_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HostCatalogServiceClient is the client API for HostCatalogService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HostCatalogServiceClient interface { + // This retrieves the host catalog specified in the request using the basic view. + GetHostCatalog(ctx context.Context, in *GetHostCatalogRequest, opts ...grpc.CallOption) (*GetHostCatalogResponse, error) + ListHostCatalogs(ctx context.Context, in *ListHostCatalogsRequest, opts ...grpc.CallOption) (*ListHostCatalogsResponse, error) + CreateHostCatalog(ctx context.Context, in *CreateHostCatalogRequest, opts ...grpc.CallOption) (*CreateHostCatalogResponse, error) + UpdateHostCatalog(ctx context.Context, in *UpdateHostCatalogRequest, opts ...grpc.CallOption) (*UpdateHostCatalogResponse, error) + // Deleting a HostCatalog removes all hosts and host sets associated with this Catalog. + DeleteHostCatalog(ctx context.Context, in *DeleteHostCatalogRequest, opts ...grpc.CallOption) (*DeleteHostCatalogResponse, error) +} + +type hostCatalogServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHostCatalogServiceClient(cc grpc.ClientConnInterface) HostCatalogServiceClient { + return &hostCatalogServiceClient{cc} +} + +func (c *hostCatalogServiceClient) GetHostCatalog(ctx context.Context, in *GetHostCatalogRequest, opts ...grpc.CallOption) (*GetHostCatalogResponse, error) { + out := new(GetHostCatalogResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostCatalogService/GetHostCatalog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCatalogServiceClient) ListHostCatalogs(ctx context.Context, in *ListHostCatalogsRequest, opts ...grpc.CallOption) (*ListHostCatalogsResponse, error) { + out := new(ListHostCatalogsResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostCatalogService/ListHostCatalogs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCatalogServiceClient) CreateHostCatalog(ctx context.Context, in *CreateHostCatalogRequest, opts ...grpc.CallOption) (*CreateHostCatalogResponse, error) { + out := new(CreateHostCatalogResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostCatalogService/CreateHostCatalog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCatalogServiceClient) UpdateHostCatalog(ctx context.Context, in *UpdateHostCatalogRequest, opts ...grpc.CallOption) (*UpdateHostCatalogResponse, error) { + out := new(UpdateHostCatalogResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostCatalogService/UpdateHostCatalog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostCatalogServiceClient) DeleteHostCatalog(ctx context.Context, in *DeleteHostCatalogRequest, opts ...grpc.CallOption) (*DeleteHostCatalogResponse, error) { + out := new(DeleteHostCatalogResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostCatalogService/DeleteHostCatalog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostCatalogServiceServer is the server API for HostCatalogService service. +type HostCatalogServiceServer interface { + // This retrieves the host catalog specified in the request using the basic view. + GetHostCatalog(context.Context, *GetHostCatalogRequest) (*GetHostCatalogResponse, error) + ListHostCatalogs(context.Context, *ListHostCatalogsRequest) (*ListHostCatalogsResponse, error) + CreateHostCatalog(context.Context, *CreateHostCatalogRequest) (*CreateHostCatalogResponse, error) + UpdateHostCatalog(context.Context, *UpdateHostCatalogRequest) (*UpdateHostCatalogResponse, error) + // Deleting a HostCatalog removes all hosts and host sets associated with this Catalog. + DeleteHostCatalog(context.Context, *DeleteHostCatalogRequest) (*DeleteHostCatalogResponse, error) +} + +// UnimplementedHostCatalogServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHostCatalogServiceServer struct { +} + +func (*UnimplementedHostCatalogServiceServer) GetHostCatalog(context.Context, *GetHostCatalogRequest) (*GetHostCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHostCatalog not implemented") +} +func (*UnimplementedHostCatalogServiceServer) ListHostCatalogs(context.Context, *ListHostCatalogsRequest) (*ListHostCatalogsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHostCatalogs not implemented") +} +func (*UnimplementedHostCatalogServiceServer) CreateHostCatalog(context.Context, *CreateHostCatalogRequest) (*CreateHostCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHostCatalog not implemented") +} +func (*UnimplementedHostCatalogServiceServer) UpdateHostCatalog(context.Context, *UpdateHostCatalogRequest) (*UpdateHostCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHostCatalog not implemented") +} +func (*UnimplementedHostCatalogServiceServer) DeleteHostCatalog(context.Context, *DeleteHostCatalogRequest) (*DeleteHostCatalogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteHostCatalog not implemented") +} + +func RegisterHostCatalogServiceServer(s *grpc.Server, srv HostCatalogServiceServer) { + s.RegisterService(&_HostCatalogService_serviceDesc, srv) +} + +func _HostCatalogService_GetHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHostCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCatalogServiceServer).GetHostCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostCatalogService/GetHostCatalog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCatalogServiceServer).GetHostCatalog(ctx, req.(*GetHostCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCatalogService_ListHostCatalogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHostCatalogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCatalogServiceServer).ListHostCatalogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostCatalogService/ListHostCatalogs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCatalogServiceServer).ListHostCatalogs(ctx, req.(*ListHostCatalogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCatalogService_CreateHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHostCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCatalogServiceServer).CreateHostCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostCatalogService/CreateHostCatalog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCatalogServiceServer).CreateHostCatalog(ctx, req.(*CreateHostCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCatalogService_UpdateHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHostCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCatalogServiceServer).UpdateHostCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostCatalogService/UpdateHostCatalog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCatalogServiceServer).UpdateHostCatalog(ctx, req.(*UpdateHostCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostCatalogService_DeleteHostCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteHostCatalogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostCatalogServiceServer).DeleteHostCatalog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostCatalogService/DeleteHostCatalog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostCatalogServiceServer).DeleteHostCatalog(ctx, req.(*DeleteHostCatalogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HostCatalogService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "controller.api.v1.HostCatalogService", + HandlerType: (*HostCatalogServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHostCatalog", + Handler: _HostCatalogService_GetHostCatalog_Handler, + }, + { + MethodName: "ListHostCatalogs", + Handler: _HostCatalogService_ListHostCatalogs_Handler, + }, + { + MethodName: "CreateHostCatalog", + Handler: _HostCatalogService_CreateHostCatalog_Handler, + }, + { + MethodName: "UpdateHostCatalog", + Handler: _HostCatalogService_UpdateHostCatalog_Handler, + }, + { + MethodName: "DeleteHostCatalog", + Handler: _HostCatalogService_DeleteHostCatalog_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "controller/api/v1/host_catalog_service.proto", +} diff --git a/internal/gen/controller/api/host_catalog_service.pb.gw.go b/internal/gen/controller/api/host_catalog_service.pb.gw.go new file mode 100644 index 000000000..12603c1fa --- /dev/null +++ b/internal/gen/controller/api/host_catalog_service.pb.gw.go @@ -0,0 +1,871 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: controller/api/v1/host_catalog_service.proto + +/* +Package api is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package api + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_HostCatalogService_GetHostCatalog_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "id": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} +) + +func request_HostCatalogService_GetHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client HostCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostCatalogRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostCatalogService_GetHostCatalog_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetHostCatalog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostCatalogService_GetHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, server HostCatalogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostCatalogRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostCatalogService_GetHostCatalog_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetHostCatalog(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostCatalogService_ListHostCatalogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_HostCatalogService_ListHostCatalogs_0(ctx context.Context, marshaler runtime.Marshaler, client HostCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostCatalogsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostCatalogService_ListHostCatalogs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListHostCatalogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostCatalogService_ListHostCatalogs_0(ctx context.Context, marshaler runtime.Marshaler, server HostCatalogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostCatalogsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostCatalogService_ListHostCatalogs_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListHostCatalogs(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostCatalogService_CreateHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client HostCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostCatalogRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + msg, err := client.CreateHostCatalog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostCatalogService_CreateHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, server HostCatalogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostCatalogRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + msg, err := server.CreateHostCatalog(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostCatalogService_UpdateHostCatalog_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "org_id": 1, "project_id": 2, "id": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} +) + +func request_HostCatalogService_UpdateHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client HostCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostCatalogRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostCatalogService_UpdateHostCatalog_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateHostCatalog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostCatalogService_UpdateHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, server HostCatalogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostCatalogRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostCatalogService_UpdateHostCatalog_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateHostCatalog(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostCatalogService_DeleteHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, client HostCatalogServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostCatalogRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteHostCatalog(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostCatalogService_DeleteHostCatalog_0(ctx context.Context, marshaler runtime.Marshaler, server HostCatalogServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostCatalogRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteHostCatalog(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterHostCatalogServiceHandlerServer registers the http handlers for service HostCatalogService to "mux". +// UnaryRPC :call HostCatalogServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +func RegisterHostCatalogServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HostCatalogServiceServer) error { + + mux.Handle("GET", pattern_HostCatalogService_GetHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostCatalogService_GetHostCatalog_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_GetHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_GetHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostCatalogService_ListHostCatalogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostCatalogService_ListHostCatalogs_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_ListHostCatalogs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostCatalogService_CreateHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostCatalogService_CreateHostCatalog_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_CreateHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_CreateHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostCatalogService_UpdateHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostCatalogService_UpdateHostCatalog_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_UpdateHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_UpdateHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostCatalogService_DeleteHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostCatalogService_DeleteHostCatalog_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_DeleteHostCatalog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterHostCatalogServiceHandlerFromEndpoint is same as RegisterHostCatalogServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterHostCatalogServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterHostCatalogServiceHandler(ctx, mux, conn) +} + +// RegisterHostCatalogServiceHandler registers the http handlers for service HostCatalogService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterHostCatalogServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterHostCatalogServiceHandlerClient(ctx, mux, NewHostCatalogServiceClient(conn)) +} + +// RegisterHostCatalogServiceHandlerClient registers the http handlers for service HostCatalogService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HostCatalogServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HostCatalogServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "HostCatalogServiceClient" to call the correct interceptors. +func RegisterHostCatalogServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HostCatalogServiceClient) error { + + mux.Handle("GET", pattern_HostCatalogService_GetHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostCatalogService_GetHostCatalog_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_GetHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_GetHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostCatalogService_ListHostCatalogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostCatalogService_ListHostCatalogs_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_ListHostCatalogs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostCatalogService_CreateHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostCatalogService_CreateHostCatalog_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_CreateHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_CreateHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostCatalogService_UpdateHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostCatalogService_UpdateHostCatalog_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_UpdateHostCatalog_0(ctx, mux, outboundMarshaler, w, req, response_HostCatalogService_UpdateHostCatalog_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostCatalogService_DeleteHostCatalog_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostCatalogService_DeleteHostCatalog_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostCatalogService_DeleteHostCatalog_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +type response_HostCatalogService_GetHostCatalog_0 struct { + proto.Message +} + +func (m response_HostCatalogService_GetHostCatalog_0) XXX_ResponseBody() interface{} { + response := m.Message.(*GetHostCatalogResponse) + return response.Item +} + +type response_HostCatalogService_CreateHostCatalog_0 struct { + proto.Message +} + +func (m response_HostCatalogService_CreateHostCatalog_0) XXX_ResponseBody() interface{} { + response := m.Message.(*CreateHostCatalogResponse) + return response.Item +} + +type response_HostCatalogService_UpdateHostCatalog_0 struct { + proto.Message +} + +func (m response_HostCatalogService_UpdateHostCatalog_0) XXX_ResponseBody() interface{} { + response := m.Message.(*UpdateHostCatalogResponse) + return response.Item +} + +var ( + pattern_HostCatalogService_GetHostCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostCatalogService_ListHostCatalogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostCatalogService_CreateHostCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostCatalogService_UpdateHostCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostCatalogService_DeleteHostCatalog_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "id"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_HostCatalogService_GetHostCatalog_0 = runtime.ForwardResponseMessage + + forward_HostCatalogService_ListHostCatalogs_0 = runtime.ForwardResponseMessage + + forward_HostCatalogService_CreateHostCatalog_0 = runtime.ForwardResponseMessage + + forward_HostCatalogService_UpdateHostCatalog_0 = runtime.ForwardResponseMessage + + forward_HostCatalogService_DeleteHostCatalog_0 = runtime.ForwardResponseMessage +) diff --git a/internal/gen/controller/api/host_service.pb.go b/internal/gen/controller/api/host_service.pb.go new file mode 100644 index 000000000..7a49e164a --- /dev/null +++ b/internal/gen/controller/api/host_service.pb.go @@ -0,0 +1,1256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/v1/host_service.proto + +package api + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + resource "github.com/hashicorp/watchtower/internal/gen/controller/api/resource" + view "github.com/hashicorp/watchtower/internal/gen/controller/api/view" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GetHostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + View view.View `protobuf:"varint,5,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *GetHostRequest) Reset() { + *x = GetHostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostRequest) ProtoMessage() {} + +func (x *GetHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostRequest.ProtoReflect.Descriptor instead. +func (*GetHostRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetHostRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *GetHostRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetHostRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *GetHostRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetHostRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type GetHostResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.Host `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *GetHostResponse) Reset() { + *x = GetHostResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostResponse) ProtoMessage() {} + +func (x *GetHostResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostResponse.ProtoReflect.Descriptor instead. +func (*GetHostResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetHostResponse) GetItem() *resource.Host { + if x != nil { + return x.Item + } + return nil +} + +type ListHostsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + View view.View `protobuf:"varint,4,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *ListHostsRequest) Reset() { + *x = ListHostsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostsRequest) ProtoMessage() {} + +func (x *ListHostsRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostsRequest.ProtoReflect.Descriptor instead. +func (*ListHostsRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListHostsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListHostsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListHostsRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *ListHostsRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type ListHostsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*resource.Host `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListHostsResponse) Reset() { + *x = ListHostsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostsResponse) ProtoMessage() {} + +func (x *ListHostsResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostsResponse.ProtoReflect.Descriptor instead. +func (*ListHostsResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListHostsResponse) GetItems() []*resource.Host { + if x != nil { + return x.Items + } + return nil +} + +type CreateHostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Item *resource.Host `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostRequest) Reset() { + *x = CreateHostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostRequest) ProtoMessage() {} + +func (x *CreateHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostRequest.ProtoReflect.Descriptor instead. +func (*CreateHostRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateHostRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CreateHostRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateHostRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *CreateHostRequest) GetItem() *resource.Host { + if x != nil { + return x.Item + } + return nil +} + +type CreateHostResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + Item *resource.Host `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostResponse) Reset() { + *x = CreateHostResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostResponse) ProtoMessage() {} + +func (x *CreateHostResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostResponse.ProtoReflect.Descriptor instead. +func (*CreateHostResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateHostResponse) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *CreateHostResponse) GetItem() *resource.Host { + if x != nil { + return x.Item + } + return nil +} + +type UpdateHostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + Item *resource.Host `protobuf:"bytes,5,opt,name=item,proto3" json:"item,omitempty"` + UpdateMask *field_mask.FieldMask `protobuf:"bytes,6,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateHostRequest) Reset() { + *x = UpdateHostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostRequest) ProtoMessage() {} + +func (x *UpdateHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostRequest.ProtoReflect.Descriptor instead. +func (*UpdateHostRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateHostRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UpdateHostRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateHostRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *UpdateHostRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateHostRequest) GetItem() *resource.Host { + if x != nil { + return x.Item + } + return nil +} + +func (x *UpdateHostRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateHostResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.Host `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *UpdateHostResponse) Reset() { + *x = UpdateHostResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostResponse) ProtoMessage() {} + +func (x *UpdateHostResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostResponse.ProtoReflect.Descriptor instead. +func (*UpdateHostResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateHostResponse) GetItem() *resource.Host { + if x != nil { + return x.Item + } + return nil +} + +type DeleteHostRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteHostRequest) Reset() { + *x = DeleteHostRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostRequest) ProtoMessage() {} + +func (x *DeleteHostRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostRequest.ProtoReflect.Descriptor instead. +func (*DeleteHostRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteHostRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DeleteHostRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteHostRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *DeleteHostRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteHostResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Existed bool `protobuf:"varint,1,opt,name=existed,proto3" json:"existed,omitempty"` +} + +func (x *DeleteHostResponse) Reset() { + *x = DeleteHostResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostResponse) ProtoMessage() {} + +func (x *DeleteHostResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostResponse.ProtoReflect.Descriptor instead. +func (*DeleteHostResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_service_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteHostResponse) GetExisted() bool { + if x != nil { + return x.Existed + } + return false +} + +var File_controller_api_v1_host_service_proto protoreflect.FileDescriptor + +var file_controller_api_v1_host_service_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x69, 0x65, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, + 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, + 0x76, 0x69, 0x65, 0x77, 0x22, 0x47, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xa2, 0x01, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, + 0x65, 0x77, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, + 0xa7, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x6f, 0x73, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x5c, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, + 0x66, 0x12, 0x34, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xf4, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, + 0x6d, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, + 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4a, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2e, + 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x32, 0xaf, + 0x08, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc9, + 0x01, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x77, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x12, 0x52, 0x2f, 0x76, 0x31, 0x2f, 0x6f, + 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, + 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x62, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x92, 0x41, 0x14, 0x12, 0x12, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, + 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x12, 0xdb, 0x01, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x12, 0x4d, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x92, 0x41, 0x2a, 0x12, 0x28, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0xd5, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x22, 0x4d, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, + 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x16, 0x12, 0x14, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, + 0x12, 0xd3, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, + 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x60, 0x32, 0x52, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, + 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x0f, 0x12, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, + 0x61, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x12, 0xc7, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x6c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x2a, 0x52, 0x2f, 0x76, 0x31, 0x2f, + 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x92, 0x41, + 0x0f, 0x12, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x61, 0x20, 0x48, 0x6f, 0x73, 0x74, + 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, + 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x3b, + 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_v1_host_service_proto_rawDescOnce sync.Once + file_controller_api_v1_host_service_proto_rawDescData = file_controller_api_v1_host_service_proto_rawDesc +) + +func file_controller_api_v1_host_service_proto_rawDescGZIP() []byte { + file_controller_api_v1_host_service_proto_rawDescOnce.Do(func() { + file_controller_api_v1_host_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_v1_host_service_proto_rawDescData) + }) + return file_controller_api_v1_host_service_proto_rawDescData +} + +var file_controller_api_v1_host_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_controller_api_v1_host_service_proto_goTypes = []interface{}{ + (*GetHostRequest)(nil), // 0: controller.api.v1.GetHostRequest + (*GetHostResponse)(nil), // 1: controller.api.v1.GetHostResponse + (*ListHostsRequest)(nil), // 2: controller.api.v1.ListHostsRequest + (*ListHostsResponse)(nil), // 3: controller.api.v1.ListHostsResponse + (*CreateHostRequest)(nil), // 4: controller.api.v1.CreateHostRequest + (*CreateHostResponse)(nil), // 5: controller.api.v1.CreateHostResponse + (*UpdateHostRequest)(nil), // 6: controller.api.v1.UpdateHostRequest + (*UpdateHostResponse)(nil), // 7: controller.api.v1.UpdateHostResponse + (*DeleteHostRequest)(nil), // 8: controller.api.v1.DeleteHostRequest + (*DeleteHostResponse)(nil), // 9: controller.api.v1.DeleteHostResponse + (view.View)(0), // 10: controller.api.view.v1.View + (*resource.Host)(nil), // 11: controller.api.resource.v1.Host + (*field_mask.FieldMask)(nil), // 12: google.protobuf.FieldMask +} +var file_controller_api_v1_host_service_proto_depIdxs = []int32{ + 10, // 0: controller.api.v1.GetHostRequest.view:type_name -> controller.api.view.v1.View + 11, // 1: controller.api.v1.GetHostResponse.item:type_name -> controller.api.resource.v1.Host + 10, // 2: controller.api.v1.ListHostsRequest.view:type_name -> controller.api.view.v1.View + 11, // 3: controller.api.v1.ListHostsResponse.items:type_name -> controller.api.resource.v1.Host + 11, // 4: controller.api.v1.CreateHostRequest.item:type_name -> controller.api.resource.v1.Host + 11, // 5: controller.api.v1.CreateHostResponse.item:type_name -> controller.api.resource.v1.Host + 11, // 6: controller.api.v1.UpdateHostRequest.item:type_name -> controller.api.resource.v1.Host + 12, // 7: controller.api.v1.UpdateHostRequest.update_mask:type_name -> google.protobuf.FieldMask + 11, // 8: controller.api.v1.UpdateHostResponse.item:type_name -> controller.api.resource.v1.Host + 0, // 9: controller.api.v1.HostService.GetHost:input_type -> controller.api.v1.GetHostRequest + 2, // 10: controller.api.v1.HostService.ListHosts:input_type -> controller.api.v1.ListHostsRequest + 4, // 11: controller.api.v1.HostService.CreateHost:input_type -> controller.api.v1.CreateHostRequest + 6, // 12: controller.api.v1.HostService.UpdateHost:input_type -> controller.api.v1.UpdateHostRequest + 8, // 13: controller.api.v1.HostService.DeleteHost:input_type -> controller.api.v1.DeleteHostRequest + 1, // 14: controller.api.v1.HostService.GetHost:output_type -> controller.api.v1.GetHostResponse + 3, // 15: controller.api.v1.HostService.ListHosts:output_type -> controller.api.v1.ListHostsResponse + 5, // 16: controller.api.v1.HostService.CreateHost:output_type -> controller.api.v1.CreateHostResponse + 7, // 17: controller.api.v1.HostService.UpdateHost:output_type -> controller.api.v1.UpdateHostResponse + 9, // 18: controller.api.v1.HostService.DeleteHost:output_type -> controller.api.v1.DeleteHostResponse + 14, // [14:19] is the sub-list for method output_type + 9, // [9:14] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_controller_api_v1_host_service_proto_init() } +func file_controller_api_v1_host_service_proto_init() { + if File_controller_api_v1_host_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_v1_host_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_v1_host_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_controller_api_v1_host_service_proto_goTypes, + DependencyIndexes: file_controller_api_v1_host_service_proto_depIdxs, + MessageInfos: file_controller_api_v1_host_service_proto_msgTypes, + }.Build() + File_controller_api_v1_host_service_proto = out.File + file_controller_api_v1_host_service_proto_rawDesc = nil + file_controller_api_v1_host_service_proto_goTypes = nil + file_controller_api_v1_host_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HostServiceClient is the client API for HostService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HostServiceClient interface { + // This retrieves the host specified in the request using the basic view. + GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error) + ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error) + CreateHost(ctx context.Context, in *CreateHostRequest, opts ...grpc.CallOption) (*CreateHostResponse, error) + UpdateHost(ctx context.Context, in *UpdateHostRequest, opts ...grpc.CallOption) (*UpdateHostResponse, error) + DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*DeleteHostResponse, error) +} + +type hostServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHostServiceClient(cc grpc.ClientConnInterface) HostServiceClient { + return &hostServiceClient{cc} +} + +func (c *hostServiceClient) GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error) { + out := new(GetHostResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostService/GetHost", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) ListHosts(ctx context.Context, in *ListHostsRequest, opts ...grpc.CallOption) (*ListHostsResponse, error) { + out := new(ListHostsResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostService/ListHosts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) CreateHost(ctx context.Context, in *CreateHostRequest, opts ...grpc.CallOption) (*CreateHostResponse, error) { + out := new(CreateHostResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostService/CreateHost", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) UpdateHost(ctx context.Context, in *UpdateHostRequest, opts ...grpc.CallOption) (*UpdateHostResponse, error) { + out := new(UpdateHostResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostService/UpdateHost", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostServiceClient) DeleteHost(ctx context.Context, in *DeleteHostRequest, opts ...grpc.CallOption) (*DeleteHostResponse, error) { + out := new(DeleteHostResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostService/DeleteHost", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostServiceServer is the server API for HostService service. +type HostServiceServer interface { + // This retrieves the host specified in the request using the basic view. + GetHost(context.Context, *GetHostRequest) (*GetHostResponse, error) + ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error) + CreateHost(context.Context, *CreateHostRequest) (*CreateHostResponse, error) + UpdateHost(context.Context, *UpdateHostRequest) (*UpdateHostResponse, error) + DeleteHost(context.Context, *DeleteHostRequest) (*DeleteHostResponse, error) +} + +// UnimplementedHostServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHostServiceServer struct { +} + +func (*UnimplementedHostServiceServer) GetHost(context.Context, *GetHostRequest) (*GetHostResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHost not implemented") +} +func (*UnimplementedHostServiceServer) ListHosts(context.Context, *ListHostsRequest) (*ListHostsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHosts not implemented") +} +func (*UnimplementedHostServiceServer) CreateHost(context.Context, *CreateHostRequest) (*CreateHostResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHost not implemented") +} +func (*UnimplementedHostServiceServer) UpdateHost(context.Context, *UpdateHostRequest) (*UpdateHostResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHost not implemented") +} +func (*UnimplementedHostServiceServer) DeleteHost(context.Context, *DeleteHostRequest) (*DeleteHostResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteHost not implemented") +} + +func RegisterHostServiceServer(s *grpc.Server, srv HostServiceServer) { + s.RegisterService(&_HostService_serviceDesc, srv) +} + +func _HostService_GetHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).GetHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostService/GetHost", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).GetHost(ctx, req.(*GetHostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_ListHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHostsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).ListHosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostService/ListHosts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).ListHosts(ctx, req.(*ListHostsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_CreateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).CreateHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostService/CreateHost", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).CreateHost(ctx, req.(*CreateHostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_UpdateHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).UpdateHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostService/UpdateHost", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).UpdateHost(ctx, req.(*UpdateHostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostService_DeleteHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteHostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostServiceServer).DeleteHost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostService/DeleteHost", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostServiceServer).DeleteHost(ctx, req.(*DeleteHostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HostService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "controller.api.v1.HostService", + HandlerType: (*HostServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHost", + Handler: _HostService_GetHost_Handler, + }, + { + MethodName: "ListHosts", + Handler: _HostService_ListHosts_Handler, + }, + { + MethodName: "CreateHost", + Handler: _HostService_CreateHost_Handler, + }, + { + MethodName: "UpdateHost", + Handler: _HostService_UpdateHost_Handler, + }, + { + MethodName: "DeleteHost", + Handler: _HostService_DeleteHost_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "controller/api/v1/host_service.proto", +} diff --git a/internal/gen/controller/api/host_service.pb.gw.go b/internal/gen/controller/api/host_service.pb.gw.go new file mode 100644 index 000000000..c09a984b0 --- /dev/null +++ b/internal/gen/controller/api/host_service.pb.gw.go @@ -0,0 +1,981 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: controller/api/v1/host_service.proto + +/* +Package api is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package api + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_HostService_GetHost_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2, "id": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} +) + +func request_HostService_GetHost_0(ctx context.Context, marshaler runtime.Marshaler, client HostServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostService_GetHost_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostService_GetHost_0(ctx context.Context, marshaler runtime.Marshaler, server HostServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostService_GetHost_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetHost(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostService_ListHosts_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} +) + +func request_HostService_ListHosts_0(ctx context.Context, marshaler runtime.Marshaler, client HostServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostService_ListHosts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListHosts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostService_ListHosts_0(ctx context.Context, marshaler runtime.Marshaler, server HostServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostService_ListHosts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListHosts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostService_CreateHost_0(ctx context.Context, marshaler runtime.Marshaler, client HostServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + msg, err := client.CreateHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostService_CreateHost_0(ctx context.Context, marshaler runtime.Marshaler, server HostServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + msg, err := server.CreateHost(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostService_UpdateHost_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "org_id": 1, "project_id": 2, "host_catalog_id": 3, "id": 4}, Base: []int{1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6}} +) + +func request_HostService_UpdateHost_0(ctx context.Context, marshaler runtime.Marshaler, client HostServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostService_UpdateHost_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostService_UpdateHost_0(ctx context.Context, marshaler runtime.Marshaler, server HostServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostService_UpdateHost_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateHost(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostService_DeleteHost_0(ctx context.Context, marshaler runtime.Marshaler, client HostServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostService_DeleteHost_0(ctx context.Context, marshaler runtime.Marshaler, server HostServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteHost(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterHostServiceHandlerServer registers the http handlers for service HostService to "mux". +// UnaryRPC :call HostServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +func RegisterHostServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HostServiceServer) error { + + mux.Handle("GET", pattern_HostService_GetHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostService_GetHost_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_GetHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_GetHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostService_ListHosts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostService_ListHosts_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_ListHosts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostService_CreateHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostService_CreateHost_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_CreateHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_CreateHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostService_UpdateHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostService_UpdateHost_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_UpdateHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_UpdateHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostService_DeleteHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostService_DeleteHost_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_DeleteHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterHostServiceHandlerFromEndpoint is same as RegisterHostServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterHostServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterHostServiceHandler(ctx, mux, conn) +} + +// RegisterHostServiceHandler registers the http handlers for service HostService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterHostServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterHostServiceHandlerClient(ctx, mux, NewHostServiceClient(conn)) +} + +// RegisterHostServiceHandlerClient registers the http handlers for service HostService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HostServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HostServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "HostServiceClient" to call the correct interceptors. +func RegisterHostServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HostServiceClient) error { + + mux.Handle("GET", pattern_HostService_GetHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostService_GetHost_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_GetHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_GetHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostService_ListHosts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostService_ListHosts_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_ListHosts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostService_CreateHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostService_CreateHost_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_CreateHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_CreateHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostService_UpdateHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostService_UpdateHost_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_UpdateHost_0(ctx, mux, outboundMarshaler, w, req, response_HostService_UpdateHost_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostService_DeleteHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostService_DeleteHost_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostService_DeleteHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +type response_HostService_GetHost_0 struct { + proto.Message +} + +func (m response_HostService_GetHost_0) XXX_ResponseBody() interface{} { + response := m.Message.(*GetHostResponse) + return response.Item +} + +type response_HostService_CreateHost_0 struct { + proto.Message +} + +func (m response_HostService_CreateHost_0) XXX_ResponseBody() interface{} { + response := m.Message.(*CreateHostResponse) + return response.Item +} + +type response_HostService_UpdateHost_0 struct { + proto.Message +} + +func (m response_HostService_UpdateHost_0) XXX_ResponseBody() interface{} { + response := m.Message.(*UpdateHostResponse) + return response.Item +} + +var ( + pattern_HostService_GetHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "hosts", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostService_ListHosts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "hosts"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostService_CreateHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "hosts"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostService_UpdateHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "hosts", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostService_DeleteHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "hosts", "id"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_HostService_GetHost_0 = runtime.ForwardResponseMessage + + forward_HostService_ListHosts_0 = runtime.ForwardResponseMessage + + forward_HostService_CreateHost_0 = runtime.ForwardResponseMessage + + forward_HostService_UpdateHost_0 = runtime.ForwardResponseMessage + + forward_HostService_DeleteHost_0 = runtime.ForwardResponseMessage +) diff --git a/internal/gen/controller/api/host_set_service.pb.go b/internal/gen/controller/api/host_set_service.pb.go new file mode 100644 index 000000000..0ad3cad31 --- /dev/null +++ b/internal/gen/controller/api/host_set_service.pb.go @@ -0,0 +1,1713 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/v1/host_set_service.proto + +package api + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + _ "github.com/golang/protobuf/ptypes/wrappers" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" + resource "github.com/hashicorp/watchtower/internal/gen/controller/api/resource" + view "github.com/hashicorp/watchtower/internal/gen/controller/api/view" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type GetHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + View view.View `protobuf:"varint,5,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *GetHostSetRequest) Reset() { + *x = GetHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostSetRequest) ProtoMessage() {} + +func (x *GetHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostSetRequest.ProtoReflect.Descriptor instead. +func (*GetHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{0} +} + +func (x *GetHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *GetHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *GetHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *GetHostSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetHostSetRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type GetHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.HostSet `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *GetHostSetResponse) Reset() { + *x = GetHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetHostSetResponse) ProtoMessage() {} + +func (x *GetHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetHostSetResponse.ProtoReflect.Descriptor instead. +func (*GetHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{1} +} + +func (x *GetHostSetResponse) GetItem() *resource.HostSet { + if x != nil { + return x.Item + } + return nil +} + +type ListHostSetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + View view.View `protobuf:"varint,4,opt,name=view,proto3,enum=controller.api.view.v1.View" json:"view,omitempty"` +} + +func (x *ListHostSetsRequest) Reset() { + *x = ListHostSetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostSetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostSetsRequest) ProtoMessage() {} + +func (x *ListHostSetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostSetsRequest.ProtoReflect.Descriptor instead. +func (*ListHostSetsRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListHostSetsRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *ListHostSetsRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ListHostSetsRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *ListHostSetsRequest) GetView() view.View { + if x != nil { + return x.View + } + return view.View_BASIC +} + +type ListHostSetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*resource.HostSet `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ListHostSetsResponse) Reset() { + *x = ListHostSetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListHostSetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListHostSetsResponse) ProtoMessage() {} + +func (x *ListHostSetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListHostSetsResponse.ProtoReflect.Descriptor instead. +func (*ListHostSetsResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ListHostSetsResponse) GetItems() []*resource.HostSet { + if x != nil { + return x.Items + } + return nil +} + +type CreateHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Item *resource.HostSet `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostSetRequest) Reset() { + *x = CreateHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostSetRequest) ProtoMessage() {} + +func (x *CreateHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostSetRequest.ProtoReflect.Descriptor instead. +func (*CreateHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *CreateHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CreateHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *CreateHostSetRequest) GetItem() *resource.HostSet { + if x != nil { + return x.Item + } + return nil +} + +type CreateHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Item *resource.HostSet `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *CreateHostSetResponse) Reset() { + *x = CreateHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateHostSetResponse) ProtoMessage() {} + +func (x *CreateHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateHostSetResponse.ProtoReflect.Descriptor instead. +func (*CreateHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateHostSetResponse) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *CreateHostSetResponse) GetItem() *resource.HostSet { + if x != nil { + return x.Item + } + return nil +} + +type UpdateHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + Item *resource.HostSet `protobuf:"bytes,5,opt,name=item,proto3" json:"item,omitempty"` + UpdateMask *field_mask.FieldMask `protobuf:"bytes,6,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateHostSetRequest) Reset() { + *x = UpdateHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostSetRequest) ProtoMessage() {} + +func (x *UpdateHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostSetRequest.ProtoReflect.Descriptor instead. +func (*UpdateHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *UpdateHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *UpdateHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *UpdateHostSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateHostSetRequest) GetItem() *resource.HostSet { + if x != nil { + return x.Item + } + return nil +} + +func (x *UpdateHostSetRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type UpdateHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Item *resource.HostSet `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *UpdateHostSetResponse) Reset() { + *x = UpdateHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateHostSetResponse) ProtoMessage() {} + +func (x *UpdateHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateHostSetResponse.ProtoReflect.Descriptor instead. +func (*UpdateHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateHostSetResponse) GetItem() *resource.HostSet { + if x != nil { + return x.Item + } + return nil +} + +type DeleteHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteHostSetRequest) Reset() { + *x = DeleteHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostSetRequest) ProtoMessage() {} + +func (x *DeleteHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostSetRequest.ProtoReflect.Descriptor instead. +func (*DeleteHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *DeleteHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *DeleteHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *DeleteHostSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Existed bool `protobuf:"varint,1,opt,name=existed,proto3" json:"existed,omitempty"` +} + +func (x *DeleteHostSetResponse) Reset() { + *x = DeleteHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteHostSetResponse) ProtoMessage() {} + +func (x *DeleteHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteHostSetResponse.ProtoReflect.Descriptor instead. +func (*DeleteHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteHostSetResponse) GetExisted() bool { + if x != nil { + return x.Existed + } + return false +} + +type AddToHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + // A list of host uris which will be added to this host set. Each host referenced here must be a child of the + // same host catalog that this host set is a child of. + HostUris []string `protobuf:"bytes,5,rep,name=host_uris,json=hostUris,proto3" json:"host_uris,omitempty"` +} + +func (x *AddToHostSetRequest) Reset() { + *x = AddToHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddToHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddToHostSetRequest) ProtoMessage() {} + +func (x *AddToHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddToHostSetRequest.ProtoReflect.Descriptor instead. +func (*AddToHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{10} +} + +func (x *AddToHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *AddToHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *AddToHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *AddToHostSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AddToHostSetRequest) GetHostUris() []string { + if x != nil { + return x.HostUris + } + return nil +} + +type AddToHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddToHostSetResponse) Reset() { + *x = AddToHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddToHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddToHostSetResponse) ProtoMessage() {} + +func (x *AddToHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddToHostSetResponse.ProtoReflect.Descriptor instead. +func (*AddToHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{11} +} + +type RemoveFromHostSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrgId string `protobuf:"bytes,1,opt,name=org_id,json=orgId,proto3" json:"org_id,omitempty"` + ProjectId string `protobuf:"bytes,2,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + HostCatalogId string `protobuf:"bytes,3,opt,name=host_catalog_id,json=hostCatalogId,proto3" json:"host_catalog_id,omitempty"` + // This host set's id. + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + // A list of host uris which should not be in the host set when this request returns. + HostUris []string `protobuf:"bytes,5,rep,name=host_uris,json=hostUris,proto3" json:"host_uris,omitempty"` +} + +func (x *RemoveFromHostSetRequest) Reset() { + *x = RemoveFromHostSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveFromHostSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveFromHostSetRequest) ProtoMessage() {} + +func (x *RemoveFromHostSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveFromHostSetRequest.ProtoReflect.Descriptor instead. +func (*RemoveFromHostSetRequest) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{12} +} + +func (x *RemoveFromHostSetRequest) GetOrgId() string { + if x != nil { + return x.OrgId + } + return "" +} + +func (x *RemoveFromHostSetRequest) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *RemoveFromHostSetRequest) GetHostCatalogId() string { + if x != nil { + return x.HostCatalogId + } + return "" +} + +func (x *RemoveFromHostSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *RemoveFromHostSetRequest) GetHostUris() []string { + if x != nil { + return x.HostUris + } + return nil +} + +type RemoveFromHostSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveFromHostSetResponse) Reset() { + *x = RemoveFromHostSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveFromHostSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveFromHostSetResponse) ProtoMessage() {} + +func (x *RemoveFromHostSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_v1_host_set_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveFromHostSetResponse.ProtoReflect.Descriptor instead. +func (*RemoveFromHostSetResponse) Descriptor() ([]byte, []int) { + return file_controller_api_v1_host_set_service_proto_rawDescGZIP(), []int{13} +} + +var File_controller_api_v1_host_set_service_proto protoreflect.FileDescriptor + +var file_controller_api_v1_host_set_service_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x2c, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, + 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, + 0x65, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xb3, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, + 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x4d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x76, + 0x69, 0x65, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x52, 0x04, 0x76, 0x69, 0x65, 0x77, 0x22, 0x51, 0x0a, + 0x14, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x22, 0xad, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, + 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x22, 0x62, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x37, 0x0a, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x22, 0xfa, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, + 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, + 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, + 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, + 0x61, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, + 0x6b, 0x22, 0x50, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x69, + 0x74, 0x65, 0x6d, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, + 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x15, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0xa0, 0x01, + 0x0a, 0x13, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x55, 0x72, 0x69, 0x73, + 0x22, 0x16, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x55, 0x72, 0x69, 0x73, + 0x22, 0x1b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf3, 0x0e, + 0x0a, 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xd8, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, + 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x5e, 0x12, 0x56, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, + 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, + 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x62, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x92, 0x41, 0x16, 0x12, 0x14, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, + 0x67, 0x6c, 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0xec, 0x01, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, + 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x92, 0x41, 0x2e, 0x12, 0x2c, 0x4c, 0x69, + 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x73, 0x20, + 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0xde, 0x01, 0x0a, 0x0d, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x7a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5f, 0x22, 0x51, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, + 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, + 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, + 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x12, 0x12, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x20, 0x61, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0xe3, 0x01, 0x0a, 0x0d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x27, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x7f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, 0x32, 0x56, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, + 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, + 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x92, 0x41, 0x12, 0x12, + 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, + 0x74, 0x12, 0xd7, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, + 0x53, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x58, 0x2a, 0x56, + 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x92, 0x41, 0x12, 0x12, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x20, 0x61, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0xf9, 0x02, 0x0a, 0x0c, + 0x41, 0x64, 0x64, 0x54, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x6f, 0x48, 0x6f, + 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x97, 0x02, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x22, 0x60, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, + 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, + 0x64, 0x64, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x92, 0x41, 0xab, 0x01, 0x12, 0x23, 0x41, 0x64, + 0x64, 0x73, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x48, 0x6f, 0x73, 0x74, + 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x65, + 0x74, 0x1a, 0x83, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x6f, 0x73, + 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, + 0x53, 0x65, 0x74, 0x20, 0x69, 0x66, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x2e, + 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x20, 0x61, 0x64, 0x64, 0x65, + 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x68, 0x6f, + 0x73, 0x74, 0x20, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x68, 0x6f, 0x73, 0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x2e, 0x12, 0xf9, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x65, 0x22, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, + 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2d, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x92, 0x41, 0x99, 0x01, 0x12, 0x1d, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x73, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x65, 0x74, 0x1a, 0x78, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, + 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x65, 0x74, 0x20, + 0x69, 0x66, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, + 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x69, 0x73, 0x20, 0x74, 0x61, 0x6b, 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, + 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x2e, 0x42, 0x9a, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, + 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0x92, 0x41, 0x56, 0x12, 0x50, 0x0a, 0x0e, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x41, 0x50, 0x49, 0x12, 0x37, 0x41, 0x50, + 0x49, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x73, 0x2e, 0x32, 0x05, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x2a, 0x02, 0x02, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_v1_host_set_service_proto_rawDescOnce sync.Once + file_controller_api_v1_host_set_service_proto_rawDescData = file_controller_api_v1_host_set_service_proto_rawDesc +) + +func file_controller_api_v1_host_set_service_proto_rawDescGZIP() []byte { + file_controller_api_v1_host_set_service_proto_rawDescOnce.Do(func() { + file_controller_api_v1_host_set_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_v1_host_set_service_proto_rawDescData) + }) + return file_controller_api_v1_host_set_service_proto_rawDescData +} + +var file_controller_api_v1_host_set_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_controller_api_v1_host_set_service_proto_goTypes = []interface{}{ + (*GetHostSetRequest)(nil), // 0: controller.api.v1.GetHostSetRequest + (*GetHostSetResponse)(nil), // 1: controller.api.v1.GetHostSetResponse + (*ListHostSetsRequest)(nil), // 2: controller.api.v1.ListHostSetsRequest + (*ListHostSetsResponse)(nil), // 3: controller.api.v1.ListHostSetsResponse + (*CreateHostSetRequest)(nil), // 4: controller.api.v1.CreateHostSetRequest + (*CreateHostSetResponse)(nil), // 5: controller.api.v1.CreateHostSetResponse + (*UpdateHostSetRequest)(nil), // 6: controller.api.v1.UpdateHostSetRequest + (*UpdateHostSetResponse)(nil), // 7: controller.api.v1.UpdateHostSetResponse + (*DeleteHostSetRequest)(nil), // 8: controller.api.v1.DeleteHostSetRequest + (*DeleteHostSetResponse)(nil), // 9: controller.api.v1.DeleteHostSetResponse + (*AddToHostSetRequest)(nil), // 10: controller.api.v1.AddToHostSetRequest + (*AddToHostSetResponse)(nil), // 11: controller.api.v1.AddToHostSetResponse + (*RemoveFromHostSetRequest)(nil), // 12: controller.api.v1.RemoveFromHostSetRequest + (*RemoveFromHostSetResponse)(nil), // 13: controller.api.v1.RemoveFromHostSetResponse + (view.View)(0), // 14: controller.api.view.v1.View + (*resource.HostSet)(nil), // 15: controller.api.resource.v1.HostSet + (*field_mask.FieldMask)(nil), // 16: google.protobuf.FieldMask +} +var file_controller_api_v1_host_set_service_proto_depIdxs = []int32{ + 14, // 0: controller.api.v1.GetHostSetRequest.view:type_name -> controller.api.view.v1.View + 15, // 1: controller.api.v1.GetHostSetResponse.item:type_name -> controller.api.resource.v1.HostSet + 14, // 2: controller.api.v1.ListHostSetsRequest.view:type_name -> controller.api.view.v1.View + 15, // 3: controller.api.v1.ListHostSetsResponse.items:type_name -> controller.api.resource.v1.HostSet + 15, // 4: controller.api.v1.CreateHostSetRequest.item:type_name -> controller.api.resource.v1.HostSet + 15, // 5: controller.api.v1.CreateHostSetResponse.item:type_name -> controller.api.resource.v1.HostSet + 15, // 6: controller.api.v1.UpdateHostSetRequest.item:type_name -> controller.api.resource.v1.HostSet + 16, // 7: controller.api.v1.UpdateHostSetRequest.update_mask:type_name -> google.protobuf.FieldMask + 15, // 8: controller.api.v1.UpdateHostSetResponse.item:type_name -> controller.api.resource.v1.HostSet + 0, // 9: controller.api.v1.HostSetService.GetHostSet:input_type -> controller.api.v1.GetHostSetRequest + 2, // 10: controller.api.v1.HostSetService.ListHostSets:input_type -> controller.api.v1.ListHostSetsRequest + 4, // 11: controller.api.v1.HostSetService.CreateHostSet:input_type -> controller.api.v1.CreateHostSetRequest + 6, // 12: controller.api.v1.HostSetService.UpdateHostSet:input_type -> controller.api.v1.UpdateHostSetRequest + 8, // 13: controller.api.v1.HostSetService.DeleteHostSet:input_type -> controller.api.v1.DeleteHostSetRequest + 10, // 14: controller.api.v1.HostSetService.AddToHostSet:input_type -> controller.api.v1.AddToHostSetRequest + 12, // 15: controller.api.v1.HostSetService.RemoveFromHostSet:input_type -> controller.api.v1.RemoveFromHostSetRequest + 1, // 16: controller.api.v1.HostSetService.GetHostSet:output_type -> controller.api.v1.GetHostSetResponse + 3, // 17: controller.api.v1.HostSetService.ListHostSets:output_type -> controller.api.v1.ListHostSetsResponse + 5, // 18: controller.api.v1.HostSetService.CreateHostSet:output_type -> controller.api.v1.CreateHostSetResponse + 7, // 19: controller.api.v1.HostSetService.UpdateHostSet:output_type -> controller.api.v1.UpdateHostSetResponse + 9, // 20: controller.api.v1.HostSetService.DeleteHostSet:output_type -> controller.api.v1.DeleteHostSetResponse + 11, // 21: controller.api.v1.HostSetService.AddToHostSet:output_type -> controller.api.v1.AddToHostSetResponse + 13, // 22: controller.api.v1.HostSetService.RemoveFromHostSet:output_type -> controller.api.v1.RemoveFromHostSetResponse + 16, // [16:23] is the sub-list for method output_type + 9, // [9:16] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_controller_api_v1_host_set_service_proto_init() } +func file_controller_api_v1_host_set_service_proto_init() { + if File_controller_api_v1_host_set_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_v1_host_set_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostSetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostSetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddToHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddToHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveFromHostSetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_v1_host_set_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveFromHostSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_v1_host_set_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_controller_api_v1_host_set_service_proto_goTypes, + DependencyIndexes: file_controller_api_v1_host_set_service_proto_depIdxs, + MessageInfos: file_controller_api_v1_host_set_service_proto_msgTypes, + }.Build() + File_controller_api_v1_host_set_service_proto = out.File + file_controller_api_v1_host_set_service_proto_rawDesc = nil + file_controller_api_v1_host_set_service_proto_goTypes = nil + file_controller_api_v1_host_set_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// HostSetServiceClient is the client API for HostSetService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HostSetServiceClient interface { + // This retrieves the host set specified in the request using the basic view. + GetHostSet(ctx context.Context, in *GetHostSetRequest, opts ...grpc.CallOption) (*GetHostSetResponse, error) + ListHostSets(ctx context.Context, in *ListHostSetsRequest, opts ...grpc.CallOption) (*ListHostSetsResponse, error) + CreateHostSet(ctx context.Context, in *CreateHostSetRequest, opts ...grpc.CallOption) (*CreateHostSetResponse, error) + UpdateHostSet(ctx context.Context, in *UpdateHostSetRequest, opts ...grpc.CallOption) (*UpdateHostSetResponse, error) + DeleteHostSet(ctx context.Context, in *DeleteHostSetRequest, opts ...grpc.CallOption) (*DeleteHostSetResponse, error) + AddToHostSet(ctx context.Context, in *AddToHostSetRequest, opts ...grpc.CallOption) (*AddToHostSetResponse, error) + RemoveFromHostSet(ctx context.Context, in *RemoveFromHostSetRequest, opts ...grpc.CallOption) (*RemoveFromHostSetResponse, error) +} + +type hostSetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewHostSetServiceClient(cc grpc.ClientConnInterface) HostSetServiceClient { + return &hostSetServiceClient{cc} +} + +func (c *hostSetServiceClient) GetHostSet(ctx context.Context, in *GetHostSetRequest, opts ...grpc.CallOption) (*GetHostSetResponse, error) { + out := new(GetHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/GetHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) ListHostSets(ctx context.Context, in *ListHostSetsRequest, opts ...grpc.CallOption) (*ListHostSetsResponse, error) { + out := new(ListHostSetsResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/ListHostSets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) CreateHostSet(ctx context.Context, in *CreateHostSetRequest, opts ...grpc.CallOption) (*CreateHostSetResponse, error) { + out := new(CreateHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/CreateHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) UpdateHostSet(ctx context.Context, in *UpdateHostSetRequest, opts ...grpc.CallOption) (*UpdateHostSetResponse, error) { + out := new(UpdateHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/UpdateHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) DeleteHostSet(ctx context.Context, in *DeleteHostSetRequest, opts ...grpc.CallOption) (*DeleteHostSetResponse, error) { + out := new(DeleteHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/DeleteHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) AddToHostSet(ctx context.Context, in *AddToHostSetRequest, opts ...grpc.CallOption) (*AddToHostSetResponse, error) { + out := new(AddToHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/AddToHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *hostSetServiceClient) RemoveFromHostSet(ctx context.Context, in *RemoveFromHostSetRequest, opts ...grpc.CallOption) (*RemoveFromHostSetResponse, error) { + out := new(RemoveFromHostSetResponse) + err := c.cc.Invoke(ctx, "/controller.api.v1.HostSetService/RemoveFromHostSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HostSetServiceServer is the server API for HostSetService service. +type HostSetServiceServer interface { + // This retrieves the host set specified in the request using the basic view. + GetHostSet(context.Context, *GetHostSetRequest) (*GetHostSetResponse, error) + ListHostSets(context.Context, *ListHostSetsRequest) (*ListHostSetsResponse, error) + CreateHostSet(context.Context, *CreateHostSetRequest) (*CreateHostSetResponse, error) + UpdateHostSet(context.Context, *UpdateHostSetRequest) (*UpdateHostSetResponse, error) + DeleteHostSet(context.Context, *DeleteHostSetRequest) (*DeleteHostSetResponse, error) + AddToHostSet(context.Context, *AddToHostSetRequest) (*AddToHostSetResponse, error) + RemoveFromHostSet(context.Context, *RemoveFromHostSetRequest) (*RemoveFromHostSetResponse, error) +} + +// UnimplementedHostSetServiceServer can be embedded to have forward compatible implementations. +type UnimplementedHostSetServiceServer struct { +} + +func (*UnimplementedHostSetServiceServer) GetHostSet(context.Context, *GetHostSetRequest) (*GetHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHostSet not implemented") +} +func (*UnimplementedHostSetServiceServer) ListHostSets(context.Context, *ListHostSetsRequest) (*ListHostSetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListHostSets not implemented") +} +func (*UnimplementedHostSetServiceServer) CreateHostSet(context.Context, *CreateHostSetRequest) (*CreateHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateHostSet not implemented") +} +func (*UnimplementedHostSetServiceServer) UpdateHostSet(context.Context, *UpdateHostSetRequest) (*UpdateHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateHostSet not implemented") +} +func (*UnimplementedHostSetServiceServer) DeleteHostSet(context.Context, *DeleteHostSetRequest) (*DeleteHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteHostSet not implemented") +} +func (*UnimplementedHostSetServiceServer) AddToHostSet(context.Context, *AddToHostSetRequest) (*AddToHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddToHostSet not implemented") +} +func (*UnimplementedHostSetServiceServer) RemoveFromHostSet(context.Context, *RemoveFromHostSetRequest) (*RemoveFromHostSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveFromHostSet not implemented") +} + +func RegisterHostSetServiceServer(s *grpc.Server, srv HostSetServiceServer) { + s.RegisterService(&_HostSetService_serviceDesc, srv) +} + +func _HostSetService_GetHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).GetHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/GetHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).GetHostSet(ctx, req.(*GetHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_ListHostSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHostSetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).ListHostSets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/ListHostSets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).ListHostSets(ctx, req.(*ListHostSetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_CreateHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).CreateHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/CreateHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).CreateHostSet(ctx, req.(*CreateHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_UpdateHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).UpdateHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/UpdateHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).UpdateHostSet(ctx, req.(*UpdateHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_DeleteHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).DeleteHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/DeleteHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).DeleteHostSet(ctx, req.(*DeleteHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_AddToHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddToHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).AddToHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/AddToHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).AddToHostSet(ctx, req.(*AddToHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HostSetService_RemoveFromHostSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveFromHostSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostSetServiceServer).RemoveFromHostSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/controller.api.v1.HostSetService/RemoveFromHostSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostSetServiceServer).RemoveFromHostSet(ctx, req.(*RemoveFromHostSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _HostSetService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "controller.api.v1.HostSetService", + HandlerType: (*HostSetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetHostSet", + Handler: _HostSetService_GetHostSet_Handler, + }, + { + MethodName: "ListHostSets", + Handler: _HostSetService_ListHostSets_Handler, + }, + { + MethodName: "CreateHostSet", + Handler: _HostSetService_CreateHostSet_Handler, + }, + { + MethodName: "UpdateHostSet", + Handler: _HostSetService_UpdateHostSet_Handler, + }, + { + MethodName: "DeleteHostSet", + Handler: _HostSetService_DeleteHostSet_Handler, + }, + { + MethodName: "AddToHostSet", + Handler: _HostSetService_AddToHostSet_Handler, + }, + { + MethodName: "RemoveFromHostSet", + Handler: _HostSetService_RemoveFromHostSet_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "controller/api/v1/host_set_service.proto", +} diff --git a/internal/gen/controller/api/host_set_service.pb.gw.go b/internal/gen/controller/api/host_set_service.pb.gw.go new file mode 100644 index 000000000..54b7fc40e --- /dev/null +++ b/internal/gen/controller/api/host_set_service.pb.gw.go @@ -0,0 +1,1339 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: controller/api/v1/host_set_service.proto + +/* +Package api is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package api + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage + +var ( + filter_HostSetService_GetHostSet_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2, "id": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} +) + +func request_HostSetService_GetHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostSetService_GetHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_GetHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostSetService_GetHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostSetService_ListHostSets_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} +) + +func request_HostSetService_ListHostSets_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostSetsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostSetService_ListHostSets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListHostSets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_ListHostSets_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListHostSetsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostSetService_ListHostSets_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListHostSets(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostSetService_CreateHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostSetRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + msg, err := client.CreateHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_CreateHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateHostSetRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + msg, err := server.CreateHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostSetService_UpdateHostSet_0 = &utilities.DoubleArray{Encoding: map[string]int{"item": 0, "org_id": 1, "project_id": 2, "host_catalog_id": 3, "id": 4}, Base: []int{1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6}} +) + +func request_HostSetService_UpdateHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostSetRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostSetService_UpdateHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_UpdateHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateHostSetRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Item); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + _, md := descriptor.ForMessage(protoReq.Item) + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), md); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostSetService_UpdateHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +func request_HostSetService_DeleteHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_DeleteHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostSetService_AddToHostSet_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2, "id": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} +) + +func request_HostSetService_AddToHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddToHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostSetService_AddToHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddToHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_AddToHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddToHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostSetService_AddToHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddToHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_HostSetService_RemoveFromHostSet_0 = &utilities.DoubleArray{Encoding: map[string]int{"org_id": 0, "project_id": 1, "host_catalog_id": 2, "id": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} +) + +func request_HostSetService_RemoveFromHostSet_0(ctx context.Context, marshaler runtime.Marshaler, client HostSetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveFromHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_HostSetService_RemoveFromHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveFromHostSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_HostSetService_RemoveFromHostSet_0(ctx context.Context, marshaler runtime.Marshaler, server HostSetServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveFromHostSetRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["org_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "org_id") + } + + protoReq.OrgId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "org_id", err) + } + + val, ok = pathParams["project_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_id") + } + + protoReq.ProjectId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_id", err) + } + + val, ok = pathParams["host_catalog_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_catalog_id") + } + + protoReq.HostCatalogId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_catalog_id", err) + } + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_HostSetService_RemoveFromHostSet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveFromHostSet(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterHostSetServiceHandlerServer registers the http handlers for service HostSetService to "mux". +// UnaryRPC :call HostSetServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +func RegisterHostSetServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HostSetServiceServer) error { + + mux.Handle("GET", pattern_HostSetService_GetHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_GetHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_GetHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_GetHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostSetService_ListHostSets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_ListHostSets_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_ListHostSets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_CreateHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_CreateHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_CreateHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_CreateHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostSetService_UpdateHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_UpdateHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_UpdateHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_UpdateHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostSetService_DeleteHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_DeleteHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_DeleteHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_AddToHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_AddToHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_AddToHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_RemoveFromHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_HostSetService_RemoveFromHostSet_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_RemoveFromHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterHostSetServiceHandlerFromEndpoint is same as RegisterHostSetServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterHostSetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterHostSetServiceHandler(ctx, mux, conn) +} + +// RegisterHostSetServiceHandler registers the http handlers for service HostSetService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterHostSetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterHostSetServiceHandlerClient(ctx, mux, NewHostSetServiceClient(conn)) +} + +// RegisterHostSetServiceHandlerClient registers the http handlers for service HostSetService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "HostSetServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "HostSetServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "HostSetServiceClient" to call the correct interceptors. +func RegisterHostSetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HostSetServiceClient) error { + + mux.Handle("GET", pattern_HostSetService_GetHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_GetHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_GetHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_GetHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_HostSetService_ListHostSets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_ListHostSets_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_ListHostSets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_CreateHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_CreateHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_CreateHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_CreateHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_HostSetService_UpdateHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_UpdateHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_UpdateHostSet_0(ctx, mux, outboundMarshaler, w, req, response_HostSetService_UpdateHostSet_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_HostSetService_DeleteHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_DeleteHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_DeleteHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_AddToHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_AddToHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_AddToHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_HostSetService_RemoveFromHostSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_HostSetService_RemoveFromHostSet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_HostSetService_RemoveFromHostSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +type response_HostSetService_GetHostSet_0 struct { + proto.Message +} + +func (m response_HostSetService_GetHostSet_0) XXX_ResponseBody() interface{} { + response := m.Message.(*GetHostSetResponse) + return response.Item +} + +type response_HostSetService_CreateHostSet_0 struct { + proto.Message +} + +func (m response_HostSetService_CreateHostSet_0) XXX_ResponseBody() interface{} { + response := m.Message.(*CreateHostSetResponse) + return response.Item +} + +type response_HostSetService_UpdateHostSet_0 struct { + proto.Message +} + +func (m response_HostSetService_UpdateHostSet_0) XXX_ResponseBody() interface{} { + response := m.Message.(*UpdateHostSetResponse) + return response.Item +} + +var ( + pattern_HostSetService_GetHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_ListHostSets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_CreateHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_UpdateHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_DeleteHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets", "id"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_AddToHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets", "id"}, "add-hosts", runtime.AssumeColonVerbOpt(true))) + + pattern_HostSetService_RemoveFromHostSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"v1", "orgs", "org_id", "projects", "project_id", "host-catalogs", "host_catalog_id", "host-sets", "id"}, "remove-hosts", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_HostSetService_GetHostSet_0 = runtime.ForwardResponseMessage + + forward_HostSetService_ListHostSets_0 = runtime.ForwardResponseMessage + + forward_HostSetService_CreateHostSet_0 = runtime.ForwardResponseMessage + + forward_HostSetService_UpdateHostSet_0 = runtime.ForwardResponseMessage + + forward_HostSetService_DeleteHostSet_0 = runtime.ForwardResponseMessage + + forward_HostSetService_AddToHostSet_0 = runtime.ForwardResponseMessage + + forward_HostSetService_RemoveFromHostSet_0 = runtime.ForwardResponseMessage +) diff --git a/internal/gen/controller/api/resource/host.pb.go b/internal/gen/controller/api/resource/host.pb.go new file mode 100644 index 000000000..bf682a464 --- /dev/null +++ b/internal/gen/controller/api/resource/host.pb.go @@ -0,0 +1,234 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/resource/v1/host.proto + +package resource + +import ( + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Host contains all fields related to a Host resource. +type Host struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + FriendlyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // The time this host was created. + // Output only. + CreatedTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + // The time this host was last updated. + // Output only. + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + // Marks the host as disabled. Default is false. + Disabled *wrappers.BoolValue `protobuf:"bytes,5,opt,name=disabled,proto3" json:"disabled,omitempty"` + // This field is required. + Address *wrappers.StringValue `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *Host) Reset() { + *x = Host{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resource_v1_host_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Host) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Host) ProtoMessage() {} + +func (x *Host) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resource_v1_host_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Host.ProtoReflect.Descriptor instead. +func (*Host) Descriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_proto_rawDescGZIP(), []int{0} +} + +func (x *Host) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *Host) GetFriendlyName() *wrappers.StringValue { + if x != nil { + return x.FriendlyName + } + return nil +} + +func (x *Host) GetCreatedTime() *timestamp.Timestamp { + if x != nil { + return x.CreatedTime + } + return nil +} + +func (x *Host) GetUpdatedTime() *timestamp.Timestamp { + if x != nil { + return x.UpdatedTime + } + return nil +} + +func (x *Host) GetDisabled() *wrappers.BoolValue { + if x != nil { + return x.Disabled + } + return nil +} + +func (x *Host) GetAddress() *wrappers.StringValue { + if x != nil { + return x.Address + } + return nil +} + +var File_controller_api_resource_v1_host_proto protoreflect.FileDescriptor + +var file_controller_api_resource_v1_host_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, + 0x41, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x36, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, + 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_resource_v1_host_proto_rawDescOnce sync.Once + file_controller_api_resource_v1_host_proto_rawDescData = file_controller_api_resource_v1_host_proto_rawDesc +) + +func file_controller_api_resource_v1_host_proto_rawDescGZIP() []byte { + file_controller_api_resource_v1_host_proto_rawDescOnce.Do(func() { + file_controller_api_resource_v1_host_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_resource_v1_host_proto_rawDescData) + }) + return file_controller_api_resource_v1_host_proto_rawDescData +} + +var file_controller_api_resource_v1_host_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_controller_api_resource_v1_host_proto_goTypes = []interface{}{ + (*Host)(nil), // 0: controller.api.resource.v1.Host + (*wrappers.StringValue)(nil), // 1: google.protobuf.StringValue + (*timestamp.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*wrappers.BoolValue)(nil), // 3: google.protobuf.BoolValue +} +var file_controller_api_resource_v1_host_proto_depIdxs = []int32{ + 1, // 0: controller.api.resource.v1.Host.friendly_name:type_name -> google.protobuf.StringValue + 2, // 1: controller.api.resource.v1.Host.created_time:type_name -> google.protobuf.Timestamp + 2, // 2: controller.api.resource.v1.Host.updated_time:type_name -> google.protobuf.Timestamp + 3, // 3: controller.api.resource.v1.Host.disabled:type_name -> google.protobuf.BoolValue + 1, // 4: controller.api.resource.v1.Host.address:type_name -> google.protobuf.StringValue + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_controller_api_resource_v1_host_proto_init() } +func file_controller_api_resource_v1_host_proto_init() { + if File_controller_api_resource_v1_host_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_resource_v1_host_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Host); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_resource_v1_host_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_resource_v1_host_proto_goTypes, + DependencyIndexes: file_controller_api_resource_v1_host_proto_depIdxs, + MessageInfos: file_controller_api_resource_v1_host_proto_msgTypes, + }.Build() + File_controller_api_resource_v1_host_proto = out.File + file_controller_api_resource_v1_host_proto_rawDesc = nil + file_controller_api_resource_v1_host_proto_goTypes = nil + file_controller_api_resource_v1_host_proto_depIdxs = nil +} diff --git a/internal/gen/controller/api/resource/host_catalog.pb.go b/internal/gen/controller/api/resource/host_catalog.pb.go new file mode 100644 index 000000000..517aaf8f7 --- /dev/null +++ b/internal/gen/controller/api/resource/host_catalog.pb.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/resource/v1/host_catalog.proto + +package resource + +import ( + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type HostCatalogType int32 + +const ( + HostCatalogType_HOST_CATALOG_TYPE_UNSPECIFIED HostCatalogType = 0 + HostCatalogType_HOST_CATALOG_TYPE_EC2 HostCatalogType = 1 + HostCatalogType_HOST_CATALOG_TYPE_STATIC HostCatalogType = 2 +) + +// Enum value maps for HostCatalogType. +var ( + HostCatalogType_name = map[int32]string{ + 0: "HOST_CATALOG_TYPE_UNSPECIFIED", + 1: "HOST_CATALOG_TYPE_EC2", + 2: "HOST_CATALOG_TYPE_STATIC", + } + HostCatalogType_value = map[string]int32{ + "HOST_CATALOG_TYPE_UNSPECIFIED": 0, + "HOST_CATALOG_TYPE_EC2": 1, + "HOST_CATALOG_TYPE_STATIC": 2, + } +) + +func (x HostCatalogType) Enum() *HostCatalogType { + p := new(HostCatalogType) + *p = x + return p +} + +func (x HostCatalogType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HostCatalogType) Descriptor() protoreflect.EnumDescriptor { + return file_controller_api_resource_v1_host_catalog_proto_enumTypes[0].Descriptor() +} + +func (HostCatalogType) Type() protoreflect.EnumType { + return &file_controller_api_resource_v1_host_catalog_proto_enumTypes[0] +} + +func (x HostCatalogType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HostCatalogType.Descriptor instead. +func (HostCatalogType) EnumDescriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_catalog_proto_rawDescGZIP(), []int{0} +} + +// HostCatalog organizes Hosts into HostSets. +type HostCatalog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + FriendlyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // The time this host_catalog was created. + // Output only. + CreatedTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + // The time this host_catalog was last updated. + // Output only. + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + // Marks the host_catalog as disabled. Default is false. + Disabled *wrappers.BoolValue `protobuf:"bytes,5,opt,name=disabled,proto3" json:"disabled,omitempty"` + // Types that are assignable to TypeDetails: + // *HostCatalog_StaticHostCatalogDetails + // *HostCatalog_Ec2HostCatalogDetails + TypeDetails isHostCatalog_TypeDetails `protobuf_oneof:"type_details"` + Type HostCatalogType `protobuf:"varint,8,opt,name=type,proto3,enum=controller.api.resource.v1.HostCatalogType" json:"type,omitempty"` // TODO: Figure out how to provide relevant information regarding Host and Set lists on a catalog. +} + +func (x *HostCatalog) Reset() { + *x = HostCatalog{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostCatalog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostCatalog) ProtoMessage() {} + +func (x *HostCatalog) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HostCatalog.ProtoReflect.Descriptor instead. +func (*HostCatalog) Descriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_catalog_proto_rawDescGZIP(), []int{0} +} + +func (x *HostCatalog) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *HostCatalog) GetFriendlyName() *wrappers.StringValue { + if x != nil { + return x.FriendlyName + } + return nil +} + +func (x *HostCatalog) GetCreatedTime() *timestamp.Timestamp { + if x != nil { + return x.CreatedTime + } + return nil +} + +func (x *HostCatalog) GetUpdatedTime() *timestamp.Timestamp { + if x != nil { + return x.UpdatedTime + } + return nil +} + +func (x *HostCatalog) GetDisabled() *wrappers.BoolValue { + if x != nil { + return x.Disabled + } + return nil +} + +func (m *HostCatalog) GetTypeDetails() isHostCatalog_TypeDetails { + if m != nil { + return m.TypeDetails + } + return nil +} + +func (x *HostCatalog) GetStaticHostCatalogDetails() *StaticCatalogDetails { + if x, ok := x.GetTypeDetails().(*HostCatalog_StaticHostCatalogDetails); ok { + return x.StaticHostCatalogDetails + } + return nil +} + +func (x *HostCatalog) GetEc2HostCatalogDetails() *Ec2CatalogDetails { + if x, ok := x.GetTypeDetails().(*HostCatalog_Ec2HostCatalogDetails); ok { + return x.Ec2HostCatalogDetails + } + return nil +} + +func (x *HostCatalog) GetType() HostCatalogType { + if x != nil { + return x.Type + } + return HostCatalogType_HOST_CATALOG_TYPE_UNSPECIFIED +} + +type isHostCatalog_TypeDetails interface { + isHostCatalog_TypeDetails() +} + +type HostCatalog_StaticHostCatalogDetails struct { + StaticHostCatalogDetails *StaticCatalogDetails `protobuf:"bytes,6,opt,name=static_host_catalog_details,json=staticHostCatalogDetails,proto3,oneof"` +} + +type HostCatalog_Ec2HostCatalogDetails struct { + Ec2HostCatalogDetails *Ec2CatalogDetails `protobuf:"bytes,7,opt,name=ec2_host_catalog_details,json=ec2HostCatalogDetails,proto3,oneof"` +} + +func (*HostCatalog_StaticHostCatalogDetails) isHostCatalog_TypeDetails() {} + +func (*HostCatalog_Ec2HostCatalogDetails) isHostCatalog_TypeDetails() {} + +type StaticCatalogDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StaticCatalogDetails) Reset() { + *x = StaticCatalogDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticCatalogDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticCatalogDetails) ProtoMessage() {} + +func (x *StaticCatalogDetails) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticCatalogDetails.ProtoReflect.Descriptor instead. +func (*StaticCatalogDetails) Descriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_catalog_proto_rawDescGZIP(), []int{1} +} + +type Ec2CatalogDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The AWS regions from which this catalog will retrieve the EC2 instances. + Regions []string `protobuf:"bytes,1,rep,name=regions,proto3" json:"regions,omitempty"` + // The access key used for authenticating with AWS when retrieving EC2 instance details. + AccessKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"` + // Input only. + SecretKey *wrappers.StringValue `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"` + // This value will never be returned in a response. + Rotate *wrappers.BoolValue `protobuf:"bytes,4,opt,name=rotate,proto3" json:"rotate,omitempty"` +} + +func (x *Ec2CatalogDetails) Reset() { + *x = Ec2CatalogDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Ec2CatalogDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ec2CatalogDetails) ProtoMessage() {} + +func (x *Ec2CatalogDetails) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resource_v1_host_catalog_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ec2CatalogDetails.ProtoReflect.Descriptor instead. +func (*Ec2CatalogDetails) Descriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_catalog_proto_rawDescGZIP(), []int{2} +} + +func (x *Ec2CatalogDetails) GetRegions() []string { + if x != nil { + return x.Regions + } + return nil +} + +func (x *Ec2CatalogDetails) GetAccessKey() *wrappers.StringValue { + if x != nil { + return x.AccessKey + } + return nil +} + +func (x *Ec2CatalogDetails) GetSecretKey() *wrappers.StringValue { + if x != nil { + return x.SecretKey + } + return nil +} + +func (x *Ec2CatalogDetails) GetRotate() *wrappers.BoolValue { + if x != nil { + return x.Rotate + } + return nil +} + +var File_controller_api_resource_v1_host_catalog_proto protoreflect.FileDescriptor + +var file_controller_api_resource_v1_host_catalog_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc6, 0x04, 0x0a, + 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x41, + 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x36, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x00, + 0x52, 0x18, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x68, 0x0a, 0x18, 0x65, 0x63, + 0x32, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x63, 0x32, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x15, 0x65, + 0x63, 0x32, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xdb, 0x01, + 0x0a, 0x11, 0x45, 0x63, 0x32, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, + 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x09, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x6d, 0x0a, 0x0f, 0x48, + 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x1d, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, + 0x47, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x43, 0x32, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, + 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x43, 0x41, 0x54, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_resource_v1_host_catalog_proto_rawDescOnce sync.Once + file_controller_api_resource_v1_host_catalog_proto_rawDescData = file_controller_api_resource_v1_host_catalog_proto_rawDesc +) + +func file_controller_api_resource_v1_host_catalog_proto_rawDescGZIP() []byte { + file_controller_api_resource_v1_host_catalog_proto_rawDescOnce.Do(func() { + file_controller_api_resource_v1_host_catalog_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_resource_v1_host_catalog_proto_rawDescData) + }) + return file_controller_api_resource_v1_host_catalog_proto_rawDescData +} + +var file_controller_api_resource_v1_host_catalog_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_controller_api_resource_v1_host_catalog_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_controller_api_resource_v1_host_catalog_proto_goTypes = []interface{}{ + (HostCatalogType)(0), // 0: controller.api.resource.v1.HostCatalogType + (*HostCatalog)(nil), // 1: controller.api.resource.v1.HostCatalog + (*StaticCatalogDetails)(nil), // 2: controller.api.resource.v1.StaticCatalogDetails + (*Ec2CatalogDetails)(nil), // 3: controller.api.resource.v1.Ec2CatalogDetails + (*wrappers.StringValue)(nil), // 4: google.protobuf.StringValue + (*timestamp.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*wrappers.BoolValue)(nil), // 6: google.protobuf.BoolValue +} +var file_controller_api_resource_v1_host_catalog_proto_depIdxs = []int32{ + 4, // 0: controller.api.resource.v1.HostCatalog.friendly_name:type_name -> google.protobuf.StringValue + 5, // 1: controller.api.resource.v1.HostCatalog.created_time:type_name -> google.protobuf.Timestamp + 5, // 2: controller.api.resource.v1.HostCatalog.updated_time:type_name -> google.protobuf.Timestamp + 6, // 3: controller.api.resource.v1.HostCatalog.disabled:type_name -> google.protobuf.BoolValue + 2, // 4: controller.api.resource.v1.HostCatalog.static_host_catalog_details:type_name -> controller.api.resource.v1.StaticCatalogDetails + 3, // 5: controller.api.resource.v1.HostCatalog.ec2_host_catalog_details:type_name -> controller.api.resource.v1.Ec2CatalogDetails + 0, // 6: controller.api.resource.v1.HostCatalog.type:type_name -> controller.api.resource.v1.HostCatalogType + 4, // 7: controller.api.resource.v1.Ec2CatalogDetails.access_key:type_name -> google.protobuf.StringValue + 4, // 8: controller.api.resource.v1.Ec2CatalogDetails.secret_key:type_name -> google.protobuf.StringValue + 6, // 9: controller.api.resource.v1.Ec2CatalogDetails.rotate:type_name -> google.protobuf.BoolValue + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_controller_api_resource_v1_host_catalog_proto_init() } +func file_controller_api_resource_v1_host_catalog_proto_init() { + if File_controller_api_resource_v1_host_catalog_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_controller_api_resource_v1_host_catalog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HostCatalog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_resource_v1_host_catalog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StaticCatalogDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_controller_api_resource_v1_host_catalog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Ec2CatalogDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_controller_api_resource_v1_host_catalog_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*HostCatalog_StaticHostCatalogDetails)(nil), + (*HostCatalog_Ec2HostCatalogDetails)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_resource_v1_host_catalog_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_resource_v1_host_catalog_proto_goTypes, + DependencyIndexes: file_controller_api_resource_v1_host_catalog_proto_depIdxs, + EnumInfos: file_controller_api_resource_v1_host_catalog_proto_enumTypes, + MessageInfos: file_controller_api_resource_v1_host_catalog_proto_msgTypes, + }.Build() + File_controller_api_resource_v1_host_catalog_proto = out.File + file_controller_api_resource_v1_host_catalog_proto_rawDesc = nil + file_controller_api_resource_v1_host_catalog_proto_goTypes = nil + file_controller_api_resource_v1_host_catalog_proto_depIdxs = nil +} diff --git a/internal/gen/controller/api/resource/host_set.pb.go b/internal/gen/controller/api/resource/host_set.pb.go new file mode 100644 index 000000000..958ebff20 --- /dev/null +++ b/internal/gen/controller/api/resource/host_set.pb.go @@ -0,0 +1,256 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/resource/v1/host_set.proto + +package resource + +import ( + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + wrappers "github.com/golang/protobuf/ptypes/wrappers" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// HostSets are a collection of sets created and managed by a catalog. +type HostSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + FriendlyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=friendly_name,json=friendlyName,proto3" json:"friendly_name,omitempty"` + // The time this host_set was created. + // Output only. + CreatedTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` + // The time this host_set was last updated. + // Output only. + UpdatedTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` + // Marks the host_set as disabled. Default is false. + Disabled *wrappers.BoolValue `protobuf:"bytes,5,opt,name=disabled,proto3" json:"disabled,omitempty"` + // The total count of hosts in this host set + // Output only. + Size *wrappers.Int32Value `protobuf:"bytes,6,opt,name=size,proto3" json:"size,omitempty"` + // A list of hosts in this host set. + // TODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts. + // Output only. + Hosts []*Host `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` +} + +func (x *HostSet) Reset() { + *x = HostSet{} + if protoimpl.UnsafeEnabled { + mi := &file_controller_api_resource_v1_host_set_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HostSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HostSet) ProtoMessage() {} + +func (x *HostSet) ProtoReflect() protoreflect.Message { + mi := &file_controller_api_resource_v1_host_set_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HostSet.ProtoReflect.Descriptor instead. +func (*HostSet) Descriptor() ([]byte, []int) { + return file_controller_api_resource_v1_host_set_proto_rawDescGZIP(), []int{0} +} + +func (x *HostSet) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *HostSet) GetFriendlyName() *wrappers.StringValue { + if x != nil { + return x.FriendlyName + } + return nil +} + +func (x *HostSet) GetCreatedTime() *timestamp.Timestamp { + if x != nil { + return x.CreatedTime + } + return nil +} + +func (x *HostSet) GetUpdatedTime() *timestamp.Timestamp { + if x != nil { + return x.UpdatedTime + } + return nil +} + +func (x *HostSet) GetDisabled() *wrappers.BoolValue { + if x != nil { + return x.Disabled + } + return nil +} + +func (x *HostSet) GetSize() *wrappers.Int32Value { + if x != nil { + return x.Size + } + return nil +} + +func (x *HostSet) GetHosts() []*Host { + if x != nil { + return x.Hosts + } + return nil +} + +var File_controller_api_resource_v1_host_set_proto protoreflect.FileDescriptor + +var file_controller_api_resource_v1_host_set_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, + 0x74, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xfd, 0x02, 0x0a, 0x07, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x41, 0x0a, + 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x36, + 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x42, + 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, + 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_resource_v1_host_set_proto_rawDescOnce sync.Once + file_controller_api_resource_v1_host_set_proto_rawDescData = file_controller_api_resource_v1_host_set_proto_rawDesc +) + +func file_controller_api_resource_v1_host_set_proto_rawDescGZIP() []byte { + file_controller_api_resource_v1_host_set_proto_rawDescOnce.Do(func() { + file_controller_api_resource_v1_host_set_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_resource_v1_host_set_proto_rawDescData) + }) + return file_controller_api_resource_v1_host_set_proto_rawDescData +} + +var file_controller_api_resource_v1_host_set_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_controller_api_resource_v1_host_set_proto_goTypes = []interface{}{ + (*HostSet)(nil), // 0: controller.api.resource.v1.HostSet + (*wrappers.StringValue)(nil), // 1: google.protobuf.StringValue + (*timestamp.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*wrappers.BoolValue)(nil), // 3: google.protobuf.BoolValue + (*wrappers.Int32Value)(nil), // 4: google.protobuf.Int32Value + (*Host)(nil), // 5: controller.api.resource.v1.Host +} +var file_controller_api_resource_v1_host_set_proto_depIdxs = []int32{ + 1, // 0: controller.api.resource.v1.HostSet.friendly_name:type_name -> google.protobuf.StringValue + 2, // 1: controller.api.resource.v1.HostSet.created_time:type_name -> google.protobuf.Timestamp + 2, // 2: controller.api.resource.v1.HostSet.updated_time:type_name -> google.protobuf.Timestamp + 3, // 3: controller.api.resource.v1.HostSet.disabled:type_name -> google.protobuf.BoolValue + 4, // 4: controller.api.resource.v1.HostSet.size:type_name -> google.protobuf.Int32Value + 5, // 5: controller.api.resource.v1.HostSet.hosts:type_name -> controller.api.resource.v1.Host + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_controller_api_resource_v1_host_set_proto_init() } +func file_controller_api_resource_v1_host_set_proto_init() { + if File_controller_api_resource_v1_host_set_proto != nil { + return + } + file_controller_api_resource_v1_host_proto_init() + if !protoimpl.UnsafeEnabled { + file_controller_api_resource_v1_host_set_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HostSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_resource_v1_host_set_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_resource_v1_host_set_proto_goTypes, + DependencyIndexes: file_controller_api_resource_v1_host_set_proto_depIdxs, + MessageInfos: file_controller_api_resource_v1_host_set_proto_msgTypes, + }.Build() + File_controller_api_resource_v1_host_set_proto = out.File + file_controller_api_resource_v1_host_set_proto_rawDesc = nil + file_controller_api_resource_v1_host_set_proto_goTypes = nil + file_controller_api_resource_v1_host_set_proto_depIdxs = nil +} diff --git a/internal/gen/controller/api/view/view.pb.go b/internal/gen/controller/api/view/view.pb.go new file mode 100644 index 000000000..9b50be26d --- /dev/null +++ b/internal/gen/controller/api/view/view.pb.go @@ -0,0 +1,137 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.21.0 +// protoc v3.11.4 +// source: controller/api/view/v1/view.proto + +package view + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type View int32 + +const ( + View_BASIC View = 0 + View_FULL View = 1 +) + +// Enum value maps for View. +var ( + View_name = map[int32]string{ + 0: "BASIC", + 1: "FULL", + } + View_value = map[string]int32{ + "BASIC": 0, + "FULL": 1, + } +) + +func (x View) Enum() *View { + p := new(View) + *p = x + return p +} + +func (x View) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (View) Descriptor() protoreflect.EnumDescriptor { + return file_controller_api_view_v1_view_proto_enumTypes[0].Descriptor() +} + +func (View) Type() protoreflect.EnumType { + return &file_controller_api_view_v1_view_proto_enumTypes[0] +} + +func (x View) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use View.Descriptor instead. +func (View) EnumDescriptor() ([]byte, []int) { + return file_controller_api_view_v1_view_proto_rawDescGZIP(), []int{0} +} + +var File_controller_api_view_v1_view_proto protoreflect.FileDescriptor + +var file_controller_api_view_v1_view_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x69, 0x65, 0x77, 0x2e, 0x76, 0x31, 0x2a, 0x1b, 0x0a, 0x04, 0x56, + 0x69, 0x65, 0x77, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x74, 0x6f, 0x77, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x76, 0x69, 0x65, + 0x77, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_controller_api_view_v1_view_proto_rawDescOnce sync.Once + file_controller_api_view_v1_view_proto_rawDescData = file_controller_api_view_v1_view_proto_rawDesc +) + +func file_controller_api_view_v1_view_proto_rawDescGZIP() []byte { + file_controller_api_view_v1_view_proto_rawDescOnce.Do(func() { + file_controller_api_view_v1_view_proto_rawDescData = protoimpl.X.CompressGZIP(file_controller_api_view_v1_view_proto_rawDescData) + }) + return file_controller_api_view_v1_view_proto_rawDescData +} + +var file_controller_api_view_v1_view_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_controller_api_view_v1_view_proto_goTypes = []interface{}{ + (View)(0), // 0: controller.api.view.v1.View +} +var file_controller_api_view_v1_view_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_controller_api_view_v1_view_proto_init() } +func file_controller_api_view_v1_view_proto_init() { + if File_controller_api_view_v1_view_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_controller_api_view_v1_view_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_controller_api_view_v1_view_proto_goTypes, + DependencyIndexes: file_controller_api_view_v1_view_proto_depIdxs, + EnumInfos: file_controller_api_view_v1_view_proto_enumTypes, + }.Build() + File_controller_api_view_v1_view_proto = out.File + file_controller_api_view_v1_view_proto_rawDesc = nil + file_controller_api_view_v1_view_proto_goTypes = nil + file_controller_api_view_v1_view_proto_depIdxs = nil +} diff --git a/internal/proto/local/controller/api/resource/v1/host.proto b/internal/proto/local/controller/api/resource/v1/host.proto new file mode 100644 index 000000000..203c7007c --- /dev/null +++ b/internal/proto/local/controller/api/resource/v1/host.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package controller.api.resource.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +// Host contains all fields related to a Host resource. +message Host { + // Output only. + string uri = 1; + google.protobuf.StringValue friendly_name = 2; + + // The time this host was created. + // Output only. + google.protobuf.Timestamp created_time = 3; + // The time this host was last updated. + // Output only. + google.protobuf.Timestamp updated_time = 4; + + // Marks the host as disabled. Default is false. + google.protobuf.BoolValue disabled = 5; + + // This field is required. + google.protobuf.StringValue address = 6; +} \ No newline at end of file diff --git a/internal/proto/local/controller/api/resource/v1/host_catalog.proto b/internal/proto/local/controller/api/resource/v1/host_catalog.proto new file mode 100644 index 000000000..9f29833fb --- /dev/null +++ b/internal/proto/local/controller/api/resource/v1/host_catalog.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package controller.api.resource.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + + +enum HostCatalogType { + HOST_CATALOG_TYPE_UNSPECIFIED = 0; + HOST_CATALOG_TYPE_EC2 = 1; + HOST_CATALOG_TYPE_STATIC = 2; +} + +// HostCatalog organizes Hosts into HostSets. +message HostCatalog { + // Output only. + string uri = 1; + google.protobuf.StringValue friendly_name = 2; + + // The time this host_catalog was created. + // Output only. + google.protobuf.Timestamp created_time = 3; + // The time this host_catalog was last updated. + // Output only. + google.protobuf.Timestamp updated_time = 4; + + // Marks the host_catalog as disabled. Default is false. + google.protobuf.BoolValue disabled = 5; + + oneof type_details { + StaticCatalogDetails static_host_catalog_details = 6; + Ec2CatalogDetails ec2_host_catalog_details = 7; + } + + HostCatalogType type = 8; + // TODO: Figure out how to provide relevant information regarding Host and Set lists on a catalog. +} + +message StaticCatalogDetails { + // nothing here yet. +} + +message Ec2CatalogDetails { + // The AWS regions from which this catalog will retrieve the EC2 instances. + repeated string regions = 1; + + // The access key used for authenticating with AWS when retrieving EC2 instance details. + google.protobuf.StringValue access_key = 2; + // Input only. + google.protobuf.StringValue secret_key = 3; + + // This value will never be returned in a response. + google.protobuf.BoolValue rotate = 4; +} \ No newline at end of file diff --git a/internal/proto/local/controller/api/resource/v1/host_set.proto b/internal/proto/local/controller/api/resource/v1/host_set.proto new file mode 100644 index 000000000..70f287707 --- /dev/null +++ b/internal/proto/local/controller/api/resource/v1/host_set.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package controller.api.resource.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/resource;resource"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "controller/api/resource/v1/host.proto"; + +// HostSets are a collection of sets created and managed by a catalog. +message HostSet { + // Output only. + string uri = 1; + google.protobuf.StringValue friendly_name = 2; + + // The time this host_set was created. + // Output only. + google.protobuf.Timestamp created_time = 3; + // The time this host_set was last updated. + // Output only. + google.protobuf.Timestamp updated_time = 4; + + // Marks the host_set as disabled. Default is false. + google.protobuf.BoolValue disabled = 5; + + // The total count of hosts in this host set + // Output only. + google.protobuf.Int32Value size = 6; + + // A list of hosts in this host set. + // TODO: Figure out if this should be in the basic HostSet view and what view to use on the Hosts. + // Output only. + repeated Host hosts = 7; +} diff --git a/internal/proto/local/controller/api/v1/error.proto b/internal/proto/local/controller/api/v1/error.proto new file mode 100644 index 000000000..522666c19 --- /dev/null +++ b/internal/proto/local/controller/api/v1/error.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package controller.api.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api"; + +message ErrorDetails { + string trace_id = 1; + string request_id = 2; + repeated string request_fields = 3; +} + +// Error is returned by the JSON API when an error occurs. +message Error { + // The HTTP Status code applicable to this error. + int32 status = 1; + // An application-specific error string. + string code = 2; + // A human readable explanation specific to this occurrence of the error. + string message = 3; + // Additional metadata regarding the error. Depending on the error different fields will be populated. + ErrorDetails details = 4; +} diff --git a/internal/proto/local/controller/api/v1/host_catalog_service.proto b/internal/proto/local/controller/api/v1/host_catalog_service.proto new file mode 100644 index 000000000..c580900ba --- /dev/null +++ b/internal/proto/local/controller/api/v1/host_catalog_service.proto @@ -0,0 +1,123 @@ +syntax = "proto3"; + +package controller.api.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api"; + +import "protoc-gen-swagger/options/annotations.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; +import "controller/api/resource/v1/host_catalog.proto"; +import "controller/api/view/v1/view.proto"; + +service HostCatalogService { + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_tag) = { + description: "The host catalog service allows you to get/mutate Host catalogs of every type." + }; + + // This retrieves the host catalog specified in the request using the basic view. + rpc GetHostCatalog(GetHostCatalogRequest) returns (GetHostCatalogResponse) { + // Gets the host as specified int he url. + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Gets a single HostCatalog" + description: "Get's a single Host Catalog with the provided identifier." + }; + } + rpc ListHostCatalogs(ListHostCatalogsRequest) returns (ListHostCatalogsResponse) { + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Gets a list of HostCatalogs" + }; + } + rpc CreateHostCatalog(CreateHostCatalogRequest) returns (CreateHostCatalogResponse) { + option (google.api.http) = { + post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Creates a HostCatalog" + description: "Creates a single host catalog under the specified org and project" + }; + } + rpc UpdateHostCatalog(UpdateHostCatalogRequest) returns (UpdateHostCatalogResponse) { + option (google.api.http) = { + patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Updates a HostCatalog" + }; + } + // Deleting a HostCatalog removes all hosts and host sets associated with this Catalog. + rpc DeleteHostCatalog(DeleteHostCatalogRequest) returns (DeleteHostCatalogResponse) { + option (google.api.http) = { + delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{id}" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Deletes a HostCatalog" + }; + } +} + +message GetHostCatalogRequest { + string org_id = 1; + string project_id = 2; + string id = 3; + api.view.v1.View view = 4; +} + +message GetHostCatalogResponse { + api.resource.v1.HostCatalog item = 1; +} + +message ListHostCatalogsRequest { + string org_id = 1; + string project_id = 2; + + api.view.v1.View view = 3; +} + +message ListHostCatalogsResponse { + repeated api.resource.v1.HostCatalog items = 1; +} + +message CreateHostCatalogRequest { + string org_id = 1; + string project_id = 2; + api.resource.v1.HostCatalog item = 3; +} + +message CreateHostCatalogResponse { + string uri = 1; + api.resource.v1.HostCatalog item = 2; +} + +message UpdateHostCatalogRequest { + string org_id = 1; + string project_id = 2; + string id = 3; + api.resource.v1.HostCatalog item = 4; + google.protobuf.FieldMask update_mask = 5; +} + +message UpdateHostCatalogResponse { + api.resource.v1.HostCatalog item = 1; +} + +message DeleteHostCatalogRequest { + string org_id = 1; + string project_id = 2; + string id = 3; +} + +message DeleteHostCatalogResponse { + bool existed = 1; +} diff --git a/internal/proto/local/controller/api/v1/host_service.proto b/internal/proto/local/controller/api/v1/host_service.proto new file mode 100644 index 000000000..f87fffc29 --- /dev/null +++ b/internal/proto/local/controller/api/v1/host_service.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; + +package controller.api.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api"; + +import "protoc-gen-swagger/options/annotations.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; +import "controller/api/resource/v1/host.proto"; +import "controller/api/view/v1/view.proto"; + +service HostService { + // This retrieves the host specified in the request using the basic view. + rpc GetHost(GetHostRequest) returns (GetHostResponse) { + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Gets a single Host" + }; + } + rpc ListHosts(ListHostsRequest) returns (ListHostsResponse) { + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "List all Hosts for the specified catalog" + }; + } + rpc CreateHost(CreateHostRequest) returns (CreateHostResponse) { + option (google.api.http) = { + post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Create a single Host" + }; + } + rpc UpdateHost(UpdateHostRequest) returns (UpdateHostResponse) { + option (google.api.http) = { + patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Update a Host" + }; + } + rpc DeleteHost(DeleteHostRequest) returns (DeleteHostResponse) { + option (google.api.http) = { + delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/hosts/{id}" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Delete a Host" + }; + } +} + +message GetHostRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + string id = 4; + api.view.v1.View view = 5; +} + +message GetHostResponse { + api.resource.v1.Host item = 1; +} + +message ListHostsRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + + api.view.v1.View view = 4; +} + +message ListHostsResponse { + repeated api.resource.v1.Host items = 1; +} + +message CreateHostRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + api.resource.v1.Host item = 4; +} + +message CreateHostResponse { + string ref = 1; + api.resource.v1.Host item = 2; +} + +message UpdateHostRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + string id = 4; + api.resource.v1.Host item = 5; + google.protobuf.FieldMask update_mask = 6; +} + +message UpdateHostResponse { + api.resource.v1.Host item = 1; +} + +message DeleteHostRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + string id = 4; +} + +message DeleteHostResponse { + bool existed = 1; +} diff --git a/internal/proto/local/controller/api/v1/host_set_service.proto b/internal/proto/local/controller/api/v1/host_set_service.proto new file mode 100644 index 000000000..6fcdb705e --- /dev/null +++ b/internal/proto/local/controller/api/v1/host_set_service.proto @@ -0,0 +1,179 @@ +syntax = "proto3"; + +package controller.api.v1; + +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api;api"; + +import "protoc-gen-swagger/options/annotations.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/wrappers.proto"; +import "controller/api/resource/v1/host_set.proto"; +import "controller/api/resource/v1/host.proto"; +import "controller/api/view/v1/view.proto"; + +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { + info: { + title: "Controller API" + version: "0.0.1" + description: "API for managing resources associated with Controllers." + } + schemes: HTTPS + schemes: HTTP +}; + +service HostSetService { + // This retrieves the host set specified in the request using the basic view. + rpc GetHostSet(GetHostSetRequest) returns (GetHostSetResponse) { + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Get a single HostSet" + }; + } + rpc ListHostSets(ListHostSetsRequest) returns (ListHostSetsResponse) { + option (google.api.http) = { + get: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "List all HostSets under the specific catalog" + }; + } + rpc CreateHostSet(CreateHostSetRequest) returns (CreateHostSetResponse) { + option (google.api.http) = { + post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Create a HostSet" + }; + } + rpc UpdateHostSet(UpdateHostSetRequest) returns (UpdateHostSetResponse) { + option (google.api.http) = { + patch: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}" + body: "item" + response_body: "item" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Update a HostSet" + }; + } + rpc DeleteHostSet(DeleteHostSetRequest) returns (DeleteHostSetResponse) { + option (google.api.http) = { + delete: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Delete a HostSet" + }; + } + + rpc AddToHostSet(AddToHostSetRequest) returns (AddToHostSetResponse) { + option (google.api.http) = { + post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:add-hosts" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Adds existing Hosts to the Host Set" + description: "Adds the hosts to this Host Set if possible. All hosts added must be a child of the same host catalog this host set is a child of." + }; + } + + rpc RemoveFromHostSet(RemoveFromHostSetRequest) returns (RemoveFromHostSetResponse) { + option (google.api.http) = { + post: "/v1/orgs/{org_id}/projects/{project_id}/host-catalogs/{host_catalog_id}/host-sets/{id}:remove-hosts" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + summary: "Removes Hosts to the Host Set" + description: "Removes the hosts from this Host Set if present. If it is not present then no action is taken and no error is returned." + }; + } +} + +message GetHostSetRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + string id = 4; + api.view.v1.View view = 5; +} + +message GetHostSetResponse { + api.resource.v1.HostSet item = 1; +} + +message ListHostSetsRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + api.view.v1.View view = 4; +} + +message ListHostSetsResponse { + repeated api.resource.v1.HostSet items = 1; +} + +message CreateHostSetRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + api.resource.v1.HostSet item = 4; +} + +message CreateHostSetResponse { + string uri = 1; + api.resource.v1.HostSet item = 2; +} + +message UpdateHostSetRequest { + string org_id = 1; + string project_id = 2; + string host_catalog_id = 3; + string id = 4; + api.resource.v1.HostSet item = 5; + google.protobuf.FieldMask update_mask = 6; +} + +message UpdateHostSetResponse { + api.resource.v1.HostSet item = 1; +} + +message DeleteHostSetRequest { + string org_id = 1; + string project_id =2; + string host_catalog_id = 3; + string id = 4; +} + +message DeleteHostSetResponse { + bool existed = 1; +} + +message AddToHostSetRequest { + string org_id = 1; + string project_id =2; + string host_catalog_id = 3; + string id = 4; + + // A list of host uris which will be added to this host set. Each host referenced here must be a child of the + // same host catalog that this host set is a child of. + repeated string host_uris = 5; +} + +message AddToHostSetResponse { +} + +message RemoveFromHostSetRequest { + string org_id = 1; + string project_id =2; + string host_catalog_id = 3; + // This host set's id. + string id = 4; + + // A list of host uris which should not be in the host set when this request returns. + repeated string host_uris = 5; +} + +message RemoveFromHostSetResponse { +} diff --git a/internal/proto/local/controller/api/view/v1/view.proto b/internal/proto/local/controller/api/view/v1/view.proto new file mode 100644 index 000000000..d11684852 --- /dev/null +++ b/internal/proto/local/controller/api/view/v1/view.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package controller.api.view.v1; +option go_package = "github.com/hashicorp/watchtower/internal/gen/controller/api/view;view"; + +// Note: This does not follow any of the good proto practices of using enums (allowing 0 represent unspecified, etc.) +// This is designed this way in order to generate cleaner and easier to understand swagger. + +enum View { + BASIC = 0; + FULL = 1; +} \ No newline at end of file diff --git a/internal/servers/controller/handler.go b/internal/servers/controller/handler.go index 5e4242d7f..40c419551 100644 --- a/internal/servers/controller/handler.go +++ b/internal/servers/controller/handler.go @@ -5,8 +5,13 @@ import ( "net/http" "time" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/hashicorp/vault/internalshared/configutil" "github.com/hashicorp/watchtower/globals" + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_catalogs" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_sets" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/hosts" ) type HandlerProperties struct { @@ -15,25 +20,28 @@ type HandlerProperties struct { // Handler returns an http.Handler for the API. This can be used on // its own to mount the Vault API within another web server. -func (c *Controller) Handler(props HandlerProperties) http.Handler { +func Handler(props HandlerProperties) http.Handler { // Create the muxer to handle the actual endpoints mux := http.NewServeMux() - mux.Handle("/v1/", handleDummy()) + mux.Handle("/v1/", handleGrpcGateway()) - genericWrappedHandler := c.wrapGenericHandler(mux, props) + genericWrappedHandler := wrapGenericHandler(mux, props) return genericWrappedHandler } -func handleDummy() http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json") - w.Write([]byte(`{"foo": "bar"}`)) - }) +func handleGrpcGateway() http.Handler { + ignored := context.Background() + mux := runtime.NewServeMux() + api.RegisterHostCatalogServiceHandlerServer(ignored, mux, &host_catalogs.Service{}) + api.RegisterHostSetServiceHandlerServer(ignored, mux, &host_sets.Service{}) + api.RegisterHostServiceHandlerServer(ignored, mux, &hosts.Service{}) + + return mux } -func (c *Controller) wrapGenericHandler(h http.Handler, props HandlerProperties) http.Handler { +func wrapGenericHandler(h http.Handler, props HandlerProperties) http.Handler { var maxRequestDuration time.Duration var maxRequestSize int64 if props.ListenerConfig != nil { diff --git a/internal/servers/controller/handler_test.go b/internal/servers/controller/handler_test.go new file mode 100644 index 000000000..29021ccbf --- /dev/null +++ b/internal/servers/controller/handler_test.go @@ -0,0 +1,57 @@ +package controller + +import ( + "fmt" + "net" + "net/http" + "testing" +) + +func TestHandleGrpcGateway(t *testing.T) { + h := Handler(HandlerProperties{}) + l, err := net.Listen("tcp4", "127.0.0.1:0") + if err != nil { + t.Fatalf("Couldn't listen: %v", err) + } + defer l.Close() + go func() { + http.Serve(l, h) + }() + + cases := []struct { + name string + path string + code int + }{ + { + "Non existent path", + "v1/this-is-made-up", + http.StatusNotFound, + }, + { + "Unimplemented path", + "v1/org/1/projects/2/host-catalogs/3/host-sets/4", + http.StatusNotImplemented, + }, + { + // TODO: This will need to be updated or removed when we are actually checking the existence of org and + // project's since this path shouldn't actually map to anything yet. This simply checks to confirm some + // routing is happening. + "Implemented path", + "v1/org/1/projects/2/host-catalogs", + http.StatusOK, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + url := fmt.Sprintf("http://%s/%s", l.Addr(), tc.path) + resp, err := http.Get(url) + if err != nil { + t.Errorf("Got error: %v when non was expected.", err) + } + if got, want := resp.StatusCode, tc.code; got != want { + t.Errorf("GET on %q got code %d, wanted %d", tc.path, got, want) + } + }) + } +} diff --git a/internal/servers/controller/handlers/host_catalogs/host_catalogs_service.go b/internal/servers/controller/handlers/host_catalogs/host_catalogs_service.go new file mode 100644 index 000000000..3273c9254 --- /dev/null +++ b/internal/servers/controller/handlers/host_catalogs/host_catalogs_service.go @@ -0,0 +1,23 @@ +package host_catalogs + +import ( + "context" + + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type Service struct { + *api.UnimplementedHostCatalogServiceServer +} + +func (s Service) ListHostCatalogs(ctx context.Context, req *api.ListHostCatalogsRequest) (*api.ListHostCatalogsResponse, error) { + return nil, status.Errorf(codes.NotFound, "Org %q not found", req.OrgId) +} + +func (s Service) DeleteHostCatalog(ctx context.Context, req *api.DeleteHostCatalogRequest) (*api.DeleteHostCatalogResponse, error) { + return &api.DeleteHostCatalogResponse{Existed: false}, nil +} + +var _ api.HostCatalogServiceServer = &Service{} diff --git a/internal/servers/controller/handlers/host_catalogs/service_test.go b/internal/servers/controller/handlers/host_catalogs/service_test.go new file mode 100644 index 000000000..718ca18f3 --- /dev/null +++ b/internal/servers/controller/handlers/host_catalogs/service_test.go @@ -0,0 +1,48 @@ +package host_catalogs_test + +import ( + "context" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_catalogs" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestDelete(t *testing.T) { + toMerge := &api.DeleteHostCatalogRequest{ + OrgId: "1", + ProjectId: "2", + Id: "3", + } + + s := host_catalogs.Service{} + cases := []struct { + name string + req *api.DeleteHostCatalogRequest + res *api.DeleteHostCatalogResponse + errCode codes.Code + }{ + { + name: "Delete always succeeds even for non existant catalogs", + req: &api.DeleteHostCatalogRequest{Id: "This doesn't exist."}, + res: &api.DeleteHostCatalogResponse{}, + errCode: codes.OK, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.DeleteHostCatalogRequest) + proto.Merge(req, tc.req) + got, gErr := s.DeleteHostCatalog(context.Background(), req) + if status.Code(gErr) != tc.errCode { + t.Errorf("DeleteHostCatalog(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + if !proto.Equal(got, tc.res) { + t.Errorf("DeleteHostCatalog(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} diff --git a/internal/servers/controller/handlers/host_sets/host_set_service.go b/internal/servers/controller/handlers/host_sets/host_set_service.go new file mode 100644 index 000000000..13220363f --- /dev/null +++ b/internal/servers/controller/handlers/host_sets/host_set_service.go @@ -0,0 +1,23 @@ +package host_sets + +import ( + "context" + + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type Service struct { + *api.UnimplementedHostSetServiceServer +} + +func (s Service) ListHostSets(ctx context.Context, req *api.ListHostSetsRequest) (*api.ListHostSetsResponse, error) { + return nil, status.Errorf(codes.NotFound, "Org %q not found", req.OrgId) +} + +func (s Service) DeleteHostSet(context.Context, *api.DeleteHostSetRequest) (*api.DeleteHostSetResponse, error) { + return &api.DeleteHostSetResponse{Existed: false}, nil +} + +var _ api.HostSetServiceServer = &Service{} diff --git a/internal/servers/controller/handlers/host_sets/service_test.go b/internal/servers/controller/handlers/host_sets/service_test.go new file mode 100644 index 000000000..149cf7972 --- /dev/null +++ b/internal/servers/controller/handlers/host_sets/service_test.go @@ -0,0 +1,49 @@ +package host_sets_test + +import ( + "context" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_sets" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestDelete(t *testing.T) { + toMerge := &api.DeleteHostSetRequest{ + OrgId: "1", + ProjectId: "2", + HostCatalogId: "3", + Id: "4", + } + + s := host_sets.Service{} + cases := []struct { + name string + req *api.DeleteHostSetRequest + res *api.DeleteHostSetResponse + errCode codes.Code + }{ + { + name: "Delete succeeds even for non existing resources", + req: &api.DeleteHostSetRequest{Id: "this doesn't exist"}, + res: &api.DeleteHostSetResponse{}, + errCode: codes.OK, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.DeleteHostSetRequest) + proto.Merge(req, tc.req) + got, gErr := s.DeleteHostSet(context.Background(), req) + if status.Code(gErr) != tc.errCode { + t.Errorf("DeleteHostSet(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + if !proto.Equal(got, tc.res) { + t.Errorf("DeleteHostSet(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} diff --git a/internal/servers/controller/handlers/hosts/host_service.go b/internal/servers/controller/handlers/hosts/host_service.go new file mode 100644 index 000000000..e7aee5f4e --- /dev/null +++ b/internal/servers/controller/handlers/hosts/host_service.go @@ -0,0 +1,23 @@ +package hosts + +import ( + "context" + + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type Service struct { + *api.UnimplementedHostServiceServer +} + +func (s Service) ListHosts(ctx context.Context, req *api.ListHostsRequest) (*api.ListHostsResponse, error) { + return nil, status.Errorf(codes.NotFound, "Org %q not found", req.OrgId) +} + +func (s Service) DeleteHost(context.Context, *api.DeleteHostRequest) (*api.DeleteHostResponse, error) { + return &api.DeleteHostResponse{}, nil +} + +var _ api.HostServiceServer = &Service{} diff --git a/internal/servers/controller/handlers/hosts/service_test.go b/internal/servers/controller/handlers/hosts/service_test.go new file mode 100644 index 000000000..8917d4971 --- /dev/null +++ b/internal/servers/controller/handlers/hosts/service_test.go @@ -0,0 +1,182 @@ +package hosts_test + +import ( + "context" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/hashicorp/watchtower/internal/gen/controller/api" + "github.com/hashicorp/watchtower/internal/servers/controller/handlers/hosts" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func TestDelete(t *testing.T) { + toMerge := &api.DeleteHostRequest{ + OrgId: "1", + ProjectId: "2", + HostCatalogId: "3", + Id: "4", + } + + s := hosts.Service{} + cases := []struct { + name string + req *api.DeleteHostRequest + res *api.DeleteHostResponse + errCode codes.Code + }{ + { + name: "Success even when doesn't exist", + req: &api.DeleteHostRequest{}, + res: &api.DeleteHostResponse{}, + errCode: codes.OK, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.DeleteHostRequest) + proto.Merge(req, tc.req) + got, gErr := s.DeleteHost(context.Background(), req) + + if status.Code(gErr) != tc.errCode { + t.Errorf("DeleteHost(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + + if !proto.Equal(got, tc.res) { + t.Errorf("DeleteHost(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} + +func TestList(t *testing.T) { + toMerge := &api.ListHostsRequest{ + OrgId: "1", + ProjectId: "2", + HostCatalogId: "3", + } + + s := hosts.Service{} + cases := []struct { + name string + req *api.ListHostsRequest + res *api.ListHostsResponse + errCode codes.Code + }{ + { + name: "List from a valid catalog id", + req: &api.ListHostsRequest{}, + // TODO: Update this when the List method is implemented + res: nil, + errCode: codes.NotFound, + }, + { + name: "Non Existant Host Catalog", + req: &api.ListHostsRequest{HostCatalogId: "this doesnt exist"}, + res: nil, + errCode: codes.NotFound, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.ListHostsRequest) + proto.Merge(req, tc.req) + got, gErr := s.ListHosts(context.Background(), req) + if status.Code(gErr) != tc.errCode { + t.Errorf("ListHosts(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + if !proto.Equal(got, tc.res) { + t.Errorf("ListHosts(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} + +func TestGet(t *testing.T) { + toMerge := &api.GetHostRequest{ + OrgId: "1", + ProjectId: "2", + HostCatalogId: "3", + } + + s := hosts.Service{} + cases := []struct { + name string + req *api.GetHostRequest + res *api.GetHostResponse + errCode codes.Code + }{ + // TODO: These cases need to be updated as the handlers get implemented. + { + name: "Default request", + req: &api.GetHostRequest{}, + res: nil, + errCode: codes.Unimplemented, + }, + { + name: "Non Existant Host Catalog", + req: &api.GetHostRequest{HostCatalogId: "this doesnt exist"}, + // The response and error will need to change when this is implemented to be a 404 error + res: nil, + errCode: codes.Unimplemented, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.GetHostRequest) + proto.Merge(req, tc.req) + got, gErr := s.GetHost(context.Background(), req) + if status.Code(gErr) != tc.errCode { + t.Errorf("ListHosts(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + if !proto.Equal(got, tc.res) { + t.Errorf("ListHosts(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} + +func TestUpdate(t *testing.T) { + toMerge := &api.UpdateHostRequest{ + OrgId: "1", + ProjectId: "2", + HostCatalogId: "3", + } + + s := hosts.Service{} + cases := []struct { + name string + req *api.UpdateHostRequest + res *api.UpdateHostResponse + errCode codes.Code + }{ + // TODO: These cases need to be updated as the handlers get implemented. + { + name: "Default request", + req: &api.UpdateHostRequest{}, + res: nil, + errCode: codes.Unimplemented, + }, + { + name: "Non Existant Host Catalog", + req: &api.UpdateHostRequest{HostCatalogId: "this doesnt exist"}, + // The response and error will need to change when this is implemented to be a 404 error + res: nil, + errCode: codes.Unimplemented, + }, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := proto.Clone(toMerge).(*api.UpdateHostRequest) + proto.Merge(req, tc.req) + got, gErr := s.UpdateHost(context.Background(), req) + if status.Code(gErr) != tc.errCode { + t.Errorf("UpdateHost(%+v) got error %v, wanted %v", req, gErr, tc.errCode) + } + if !proto.Equal(got, tc.res) { + t.Errorf("UpdateHost(%q) got response %q, wanted %q", req, got, tc.res) + } + }) + } +} diff --git a/internal/servers/controller/listeners.go b/internal/servers/controller/listeners.go index d050910ec..a807b9e74 100644 --- a/internal/servers/controller/listeners.go +++ b/internal/servers/controller/listeners.go @@ -21,7 +21,7 @@ func (c *Controller) startListeners() error { servers := make([]func(), 0, len(c.conf.Listeners)) configureForAPI := func(ln *base.ServerListener) error { - handler := c.Handler(HandlerProperties{ + handler := Handler(HandlerProperties{ ListenerConfig: ln.Config, }) diff --git a/tools/tools.go b/tools/tools.go index ba6893453..8fe3f1a2f 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -1,22 +1,32 @@ // +build tools -// This file ensures tool dependencies are kept in sync. This is the recommended way of doing this according to +// This file ensures tool dependencies are kept in sync. This is the +// recommended way of doing this according to // https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module -// To update the versions used by this repo use: -// $ go mod tidy // To install the following tools at the version used by this repo run: -// $ go install (each of the dependencies listed below) +// $ make bootstrap +// or +// $ go generate -tags tools tools/tools.go package tools -import ( - _ "github.com/bufbuild/buf/cmd/buf" - _ "github.com/favadi/protoc-go-inject-tag" - _ "github.com/go-swagger/go-swagger/cmd/swagger" - // use this instead of google.golang.org/protobuf/cmd/protoc-gen-go since this supports grpc plugin while the other does not. - // see https://github.com/golang/protobuf/releases#v1.4-generated-code and - // https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0#v1.20-grpc-support - _ "github.com/golang/protobuf/protoc-gen-go" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger" -) +//go:generate go install github.com/bufbuild/buf/cmd/buf +import _ "github.com/bufbuild/buf/cmd/buf" + +//go:generate go install github.com/go-swagger/go-swagger/cmd/swagger +import _ "github.com/go-swagger/go-swagger/cmd/swagger" + +//go:generate go install github.com/favadi/protoc-go-inject-tag +import _ "github.com/favadi/protoc-go-inject-tag" + +// use this instead of google.golang.org/protobuf/cmd/protoc-gen-go since this supports grpc plugin while the other does not. +// see https://github.com/golang/protobuf/releases#v1.4-generated-code and +// https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0#v1.20-grpc-support +//go:generate go install github.com/golang/protobuf/protoc-gen-go +import _ "github.com/golang/protobuf/protoc-gen-go" + +//go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway +import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" + +//go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger +import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"