From 1ff5fa4c02c334a40686a8b7dc2f6de9c3938a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 15 Dec 2021 19:01:32 +0100 Subject: [PATCH 01/20] Add proto files for accounts and generate the code and docs --- protogen/docs/CONFIGURATION.tmpl | 78 + protogen/docs/GRPC.tmpl | 95 + .../ocis/messages/accounts/v1/grpc.md | 139 ++ .../ocis/services/accounts/v1/grpc.md | 252 +++ .../ocis/messages/accounts/v1/accounts.pb.go | 1222 ++++++++++++ .../messages/accounts/v1/accounts.pb.micro.go | 16 + .../messages/accounts/v1/accounts.pb.web.go | 191 ++ .../accounts/v1/accounts.swagger.json | 43 + .../ocis/services/accounts/v1/accounts.pb.go | 1680 +++++++++++++++++ .../services/accounts/v1/accounts.pb.micro.go | 627 ++++++ .../services/accounts/v1/accounts.pb.web.go | 1038 ++++++++++ .../accounts/v1/accounts.swagger.json | 1047 ++++++++++ protogen/proto/buf.gen.yaml | 29 + protogen/proto/buf.lock | 10 + protogen/proto/buf.yaml | 9 + .../ocis/messages/accounts/v1/accounts.proto | 329 ++++ .../ocis/services/accounts/v1/accounts.proto | 350 ++++ 17 files changed, 7155 insertions(+) create mode 100644 protogen/docs/CONFIGURATION.tmpl create mode 100644 protogen/docs/GRPC.tmpl create mode 100644 protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md create mode 100644 protogen/docs/extensions/ocis/services/accounts/v1/grpc.md create mode 100644 protogen/gen/ocis/messages/accounts/v1/accounts.pb.go create mode 100644 protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go create mode 100644 protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go create mode 100644 protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json create mode 100644 protogen/gen/ocis/services/accounts/v1/accounts.pb.go create mode 100644 protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go create mode 100644 protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go create mode 100644 protogen/gen/ocis/services/accounts/v1/accounts.swagger.json create mode 100644 protogen/proto/buf.gen.yaml create mode 100644 protogen/proto/buf.lock create mode 100644 protogen/proto/buf.yaml create mode 100644 protogen/proto/ocis/messages/accounts/v1/accounts.proto create mode 100644 protogen/proto/ocis/services/accounts/v1/accounts.proto diff --git a/protogen/docs/CONFIGURATION.tmpl b/protogen/docs/CONFIGURATION.tmpl new file mode 100644 index 00000000000..c180d7a56f7 --- /dev/null +++ b/protogen/docs/CONFIGURATION.tmpl @@ -0,0 +1,78 @@ +--- +title: "Configuration" +date: "{{ date "2006-01-02T15:04:05-0700" now }}" +weight: 20 +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/accounts/templates +geekdocFilePath: CONFIGURATION.tmpl +--- +{{- define "options"}} +{{ $fnNames := (last . ).Flags -}} +{{ range $opt := first . }} +{{ range $fnName := $fnNames }}{{ with list $fnName $opt -}} +{{ $o := last . -}} +{{ if eq $o.FnName $fnName -}} +-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} +: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} + +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end }} + +{{`{{< toc >}}`}} + +## Configuration + +### Configuration using config files + +Out of the box extensions will attempt to read configuration details from: + +```console +/etc/ocis +$HOME/.ocis +./config +``` + +For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-accounts reads `accounts.json | yaml | toml ...`*. + +So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/accounts/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. + +### Environment variables + +If you prefer to configure the service with environment variables you can see the available variables below. + +If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. + +### Command-line flags + +If you prefer to configure the service with command-line flags you can see the available variables below. Command line flags are only working when calling the subcommand directly. + +{{ $options := .Options -}} +{{ range $com := .Commands }}{{ with (list $options $com) -}} +{{ $c := last . -}} +{{ if eq $c.Name "accounts" -}} +## Root Command + +{{ $c.Usage }} + +Usage: `accounts [global options] command [command options] [arguments...]` +{{ template "options" . -}} +## Sub Commands + +{{ end -}} +{{ end -}} +{{ end -}} +{{- range $com := .Commands }}{{ with (list $options $com) -}} +{{- $c := last . }} +{{- if ne $c.Name "accounts" -}} +### accounts {{ $c.Name }} + +{{ $c.Usage }} + +Usage: `accounts {{ $c.Name }} [command options] [arguments...]` +{{ template "options" . }} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/protogen/docs/GRPC.tmpl b/protogen/docs/GRPC.tmpl new file mode 100644 index 00000000000..ca038092b7c --- /dev/null +++ b/protogen/docs/GRPC.tmpl @@ -0,0 +1,95 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{`{{< toc >}}`}} + +{{ range .Files -}} +{{ $filename := .Name }} +{{ $filenameParts := splitList "/" $filename }} +## {{ .Name }} + +{{ .Description }} +{{- range .Messages -}} +{{- /* remove newline */}}### {{ .LongName }} + +{{ .Description }} + +{{ if .HasFields -}} +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +{{ range .Fields -}} +{{- $loca := printf "#%s" (.LongType | lower | replace "." "") -}} +{{- if and (hasPrefix "ocis." .LongType) (ge (len $filenameParts) 3) -}} + {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} + {{- $fieldDir := dir (.LongType | lower | replace "." "/") -}} + {{- $loca = printf "%s/%s/grpc.md#%s" $rep (substr 5 (len $fieldDir) $fieldDir) (.Type | lower | replace "." "") -}} +{{- end -}} +| {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | +{{ end -}} +{{ end }} +{{ if .HasExtensions -}} +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{ range .Extensions -}} +| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +{{ end -}} +{{ end -}} +{{ end -}} +{{- range .Enums -}} +### {{ .LongName }} + +{{ .Description }} + +| Name | Number | Description | +| ---- | ------ | ----------- | +{{range .Values -}} +| {{.Name}} | {{.Number}} | {{nobr .Description}} | +{{ end -}} +{{ end -}} + +{{ if .HasExtensions }} + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{ range .Extensions -}} +| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | +{{ end -}} +{{ end -}} +{{- range .Services }} +### {{ .Name }} + +{{ .Description }} + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +{{ range .Methods -}} +{{- $reqLoca := printf "#%s" (.RequestLongType | lower | replace "." "") -}} +{{- $respLoca := printf "#%s" (.ResponseLongType | lower | replace "." "") -}} +{{- if and (hasPrefix ".ocis." .RequestLongType) (ge (len $filenameParts) 3) }} + {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} + {{- $reqDir := dir (.RequestLongType | lower | replace "." "/") -}} + {{- $reqLoca = printf "%s/%s/grpc.md#%s" $rep (substr 6 (len $reqDir) $reqDir) (.RequestType | lower | replace "." "") -}} +{{- end -}} +{{- if and (hasPrefix ".ocis." .ResponseLongType) (ge (len $filenameParts) 3) }} + {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} + {{- $respDir := dir (.ResponseLongType | lower | replace "." "/") -}} + {{- $respLoca = printf "%s/%s/grpc.md#%s" $rep (substr 6 (len $respDir) $respDir) (.ResponseType | lower | replace "." "") -}} +{{- end -}} +| {{.Name}} | [{{.RequestLongType}}]({{ $reqLoca }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}]({{ $respLoca }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | +{{ end -}} +{{ end -}} +{{ end }} +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +{{ range .Scalars -}} +| {{`{{< div id="`}}{{.ProtoType}}{{`" content="`}}{{.ProtoType}}{{`" >}}`}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | +{{ end }} diff --git a/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md b/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md new file mode 100644 index 00000000000..17b96362e70 --- /dev/null +++ b/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md @@ -0,0 +1,139 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/messages/accounts/v1/accounts.proto + +### Account + +Account follows the properties of the ms graph api user resource. +See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. | +| account_enabled | [bool](#bool) | | true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. | +| is_resource_account | [bool](#bool) | | A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. You could give printers or machines with a sync client resource accounts as well. A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. | +| creation_type | [string](#string) | | Indicates whether the account was created as - a regular school or work account ("" / emptystring), - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - an external account (Invitation), - self-service sign-up using email verification (EmailVerified). Read-only. | +| identities | [Identities](#identities) | repeated | Represents the identities that can be used to sign in to this account. An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. May contain multiple items with the same signInType value. Supports $filter. | +| display_name | [string](#string) | | The name displayed in the address book for the account. This is usually the combination of the user's first name, middle initial and last name. This property is required when a user is created and it cannot be cleared during updates. Supports $filter and $orderby. posixaccount MUST cn | +| preferred_name | [string](#string) | | The username posixaccount MUST uid | +| uid_number | [int64](#int64) | | TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users used for exposing the user using ldap posixaccount MUST uidnumber | +| gid_number | [int64](#int64) | | used for exposing the user using ldap posixaccount MUST gidnumber | +| mail | [string](#string) | | The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. inetorgperson MAY mail | +| description | [string](#string) | | A description, useful for resource accounts posixaccount MAY description | +| password_profile | [PasswordProfile](#passwordprofile) | | Specifies the password profile for the user. The profile contains the user’s password. This property is required when a user is created. The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. By default, a strong password is required. posixaccount MAY authPassword | +| memberOf | [Group](#group) | repeated | The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. should we only respond with repeated strings of ids? no clients should a proper filter mask! | +| created_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The created date of the account object. | +| deleted_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The date and time the user was deleted. Returned only on $select. | +| on_premises_sync_enabled | [bool](#bool) | | true* if this object is synced from an on-premises directory; *false* if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only | +| on_premises_immutable_id | [string](#string) | | This property is used to associate an on-premises LDAP user to the oCIS account object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. | +| on_premises_security_identifier | [string](#string) | | Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. | +| on_premises_distinguished_name | [string](#string) | | Contains the on-premises LDAP `distinguished name` or `DN`. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | +| on_premises_sam_account_name | [string](#string) | | Contains the on-premises `samAccountName` synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | +| on_premises_domain_name | [string](#string) | | Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | +| on_premises_user_principal_name | [string](#string) | | Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | +| on_premises_last_sync_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Indicates the last time at which the object was synced with the on-premises directory; Read-only. | +| on_premises_provisioning_errors | [OnPremisesProvisioningError](#onpremisesprovisioningerror) | repeated | Errors when using synchronization during provisioning. | +| external_user_state | [string](#string) | | For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. | +| external_user_state_change_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. | +| refresh_tokens_valid_from_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. | +| sign_in_sessions_valid_from_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. Read-only. Use revokeSignInSessions to reset. | + +### Group + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | The unique identifier for the group. Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. | +| display_name | [string](#string) | | The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $filter and $orderby. groupofnames MUST cn + +groupofnames MUST/MAY member | +| members | [Account](#account) | repeated | Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later | +| owners | [Account](#account) | repeated | groupofnames MAY businessCategory groupofnames MAY o groupofnames MAY ou groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners | +| description | [string](#string) | | An optional description for the group. Returned by default. groupofnames MAY description | +| gid_number | [int64](#int64) | | used for exposing the user using ldap posixgroup MUST gidnumber + +posixgroup MAY authPassword posixgroup MAY userPassword posixgroup MAY memberUid -> groupofnames member posixgroup MAY description -> groupofnames | +| created_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created Returned by default. Read-only. | +| deleted_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. Returned by default. Read-only. | +| expiration_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. Returned by default. Read-only. | +| hide_from_address_lists | [bool](#bool) | | True if the group is not displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. Returned only on $select. | +| visibility | [string](#string) | | Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. Visibility can be set only when a group is created; it is not editable. Returned by default. | +| on_premises_sync_enabled | [bool](#bool) | | true* if this group is synced from an on-premises directory; *false* if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter. | +| on_premises_immutable_id | [string](#string) | | This property is used to associate an on-premises LDAP user to the oCIS account object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. | +| on_premises_security_identifier | [string](#string) | | Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. | +| on_premises_distinguished_name | [string](#string) | | Contains the on-premises LDAP `distinguished name` or `DN`. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | +| on_premises_sam_account_name | [string](#string) | | Contains the on-premises `samAccountName` synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. | +| on_premises_domain_name | [string](#string) | | Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Returned by default. Read-only. | +| on_premises_net_bios_name | [string](#string) | | Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Returned by default. Read-only. | +| on_premises_last_sync_date_time | [string](#string) | | Indicates the last time at which the group was synced with the on-premises directory. Returned by default. Read-only. Supports $filter. | +| on_premises_provisioning_errors | [OnPremisesProvisioningError](#onpremisesprovisioningerror) | repeated | Errors when using synchronization during provisioning. | + +### Identities + +Identities Represents an identity used to sign in to a user account. +An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. +This enables the user to sign in to the user account with any of those associated identities. +They are also used to keep a history of old usernames. + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| sign_in_type | [string](#string) | | Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. This property can also be set to any custom string. | +| issuer | [string](#string) | | Specifies the issuer of the identity, for example facebook.com. For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com. For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com. Supports $filter. 512 character limit. | +| issuer_assigned_id | [string](#string) | | Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). When *signInType* is set to: * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address * `userName`, issuer_assigned_id must be a valid local part of an email address Supports $filter. 512 character limit. | + +### OnPremisesProvisioningError + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| category | [string](#string) | | Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. | +| occurred_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The date and time at which the error occurred. | +| property_causing_error | [string](#string) | | Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress | +| value | [string](#string) | | Value of the property causing the error. | + +### PasswordProfile + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| password | [string](#string) | | The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. | +| last_password_change_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The time when this account last changed their password. | +| password_policies | [string](#string) | repeated | Specifies password policies for the user. This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. “DisablePasswordExpiration” can also be specified. | +| force_change_password_next_sign_in | [bool](#bool) | | true* if the user must change her password on the next login; otherwise false. | +| force_change_password_next_sign_in_with_mfa | [bool](#bool) | | If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. | + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md b/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md new file mode 100644 index 00000000000..45a66887e67 --- /dev/null +++ b/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md @@ -0,0 +1,252 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/services/accounts/v1/accounts.proto + +### AddMemberRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| group_id | [string](#string) | | The id of the group to add a member to | +| account_id | [string](#string) | | The account id to add | + +### CreateAccountRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | | The account resource to create | + +### CreateGroupRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| group | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | | The account resource to create | + +### DeleteAccountRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### DeleteGroupRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### GetAccountRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### GetGroupRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### ListAccountsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| page_size | [int32](#int32) | | Optional. The maximum number of accounts to return in the response | +| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | +| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | +| query | [string](#string) | | Optional. Search criteria used to select the accounts to return. If no search criteria is specified then all accounts will be returned + +TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. + +The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. + +Some example queries are: + +* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `email=foo@example.com` returns accounts with `email` set to `foo@example.com` * Query `display_name=\\"Test String\\"` returns accounts with display names that include both "Test" and "String" | + +### ListAccountsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| accounts | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | repeated | The field name should match the noun "accounts" in the method name. There will be a maximum number of items returned based on the page_size field in the request | +| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | + +### ListGroupsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| page_size | [int32](#int32) | | Optional. The maximum number of groups to return in the response | +| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | +| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | +| query | [string](#string) | | Optional. Search criteria used to select the groups to return. If no search criteria is specified then all groups will be returned + +TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. + +The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. + +Some example queries are: + +* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `display_name=\\"Test String\\"` returns groups with display names that include both "Test" and "String" | + +### ListGroupsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| groups | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | repeated | The field name should match the noun "group" in the method name. There will be a maximum number of items returned based on the page_size field in the request | +| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | + +### ListMembersRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| page_size | [int32](#int32) | | | +| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | +| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | +| query | [string](#string) | | Optional. Search criteria used to select the groups to return. If no search criteria is specified then all groups will be returned + +TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. + +The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. + +Some example queries are: + +* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `display_name=\\"Test String\\"` returns groups with display names that include both "Test" and "String" | +| id | [string](#string) | | The id of the group to list members from | + +### ListMembersResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| members | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | repeated | The field name should match the noun "members" in the method name. There will be a maximum number of items returned based on the page_size field in the request | +| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | + +### RebuildIndexRequest + + + + +### RebuildIndexResponse + + + + +### RemoveMemberRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| group_id | [string](#string) | | The id of the group to remove a member from | +| account_id | [string](#string) | | The account id to remove | + +### UpdateAccountRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | | The account resource which replaces the resource on the server | +| update_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask | + +### UpdateGroupRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| group | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | | The group resource which replaces the resource on the server | +| update_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask | + + +### AccountsService + +Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods +https://cloud.google.com/apis/design/standard_methods?hl=de#list +https://cloud.google.com/apis/design/naming_convention?hl=de + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListAccounts | [ListAccountsRequest](#listaccountsrequest) | [ListAccountsResponse](#listaccountsresponse) | Lists accounts | +| GetAccount | [GetAccountRequest](#getaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Gets an account rpc GetAccount(GetAccountRequest) returns (Account) { | +| CreateAccount | [CreateAccountRequest](#createaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Creates an account rpc CreateAccount(CreateAccountRequest) returns (Account) { | +| UpdateAccount | [UpdateAccountRequest](#updateaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Updates an account rpc UpdateAccount(UpdateAccountRequest) returns (Account) { | +| DeleteAccount | [DeleteAccountRequest](#deleteaccountrequest) | [.google.protobuf.Empty](#googleprotobufempty) | Deletes an account | + +### GroupsService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListGroups | [ListGroupsRequest](#listgroupsrequest) | [ListGroupsResponse](#listgroupsresponse) | Lists groups | +| GetGroup | [GetGroupRequest](#getgrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Gets an groups | +| CreateGroup | [CreateGroupRequest](#creategrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Creates a group | +| UpdateGroup | [UpdateGroupRequest](#updategrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Updates a group | +| DeleteGroup | [DeleteGroupRequest](#deletegrouprequest) | [.google.protobuf.Empty](#googleprotobufempty) | Deletes a group | +| AddMember | [AddMemberRequest](#addmemberrequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http | +| RemoveMember | [RemoveMemberRequest](#removememberrequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 | +| ListMembers | [ListMembersRequest](#listmembersrequest) | [ListMembersResponse](#listmembersresponse) | group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 | + +### IndexService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| RebuildIndex | [RebuildIndexRequest](#rebuildindexrequest) | [RebuildIndexResponse](#rebuildindexresponse) | | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go new file mode 100644 index 00000000000..d55cb8b7739 --- /dev/null +++ b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go @@ -0,0 +1,1222 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/messages/accounts/v1/accounts.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + 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) +) + +// Account follows the properties of the ms graph api user resource. +// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties +type Account struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. + AccountEnabled bool `protobuf:"varint,2,opt,name=account_enabled,json=accountEnabled,proto3" json:"account_enabled,omitempty"` + // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. + // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. + // You could give printers or machines with a sync client resource accounts as well. + // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. + // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. + IsResourceAccount bool `protobuf:"varint,3,opt,name=is_resource_account,json=isResourceAccount,proto3" json:"is_resource_account,omitempty"` + // Indicates whether the account was created as + // - a regular school or work account ("" / emptystring), + // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or + // - an external account (Invitation), + // - self-service sign-up using email verification (EmailVerified). Read-only. + CreationType string `protobuf:"bytes,4,opt,name=creation_type,json=creationType,proto3" json:"creation_type,omitempty"` + // Represents the identities that can be used to sign in to this account. + // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. + // May contain multiple items with the same signInType value. Supports $filter. + Identities []*Identities `protobuf:"bytes,5,rep,name=identities,proto3" json:"identities,omitempty"` + // The name displayed in the address book for the account. + // This is usually the combination of the user's first name, middle initial and last name. + // This property is required when a user is created and it cannot be cleared during updates. + // Supports $filter and $orderby. + // posixaccount MUST cn + DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // The username + // posixaccount MUST uid + PreferredName string `protobuf:"bytes,7,opt,name=preferred_name,json=preferredName,proto3" json:"preferred_name,omitempty"` + // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users + // used for exposing the user using ldap + // posixaccount MUST uidnumber + UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"` + // used for exposing the user using ldap + // posixaccount MUST gidnumber + GidNumber int64 `protobuf:"varint,9,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` + // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. + // inetorgperson MAY mail + Mail string `protobuf:"bytes,10,opt,name=mail,proto3" json:"mail,omitempty"` + // A description, useful for resource accounts + // posixaccount MAY description + Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` + // Specifies the password profile for the user. + // The profile contains the user’s password. This property is required when a user is created. + // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. + // By default, a strong password is required. + // posixaccount MAY authPassword + PasswordProfile *PasswordProfile `protobuf:"bytes,12,opt,name=password_profile,json=passwordProfile,proto3" json:"password_profile,omitempty"` + // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. + // should we only respond with repeated strings of ids? no clients should a proper filter mask! + MemberOf []*Group `protobuf:"bytes,13,rep,name=memberOf,proto3" json:"memberOf,omitempty"` + // The created date of the account object. + CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` + // The date and time the user was deleted. Returned only on $select. + DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` + // *true* if this object is synced from an on-premises directory; + // *false* if this object was originally synced from an on-premises directory but is no longer synced; + // null if this object has never been synced from an on-premises directory (default). Read-only + OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` + // This property is used to associate an on-premises LDAP user to the oCIS account object. + // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. + // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. + OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` + // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. + OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` + // Contains the on-premises LDAP `distinguished name` or `DN`. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` + // Contains the on-premises `samAccountName` synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` + // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` + // Contains the on-premises userPrincipalName synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + OnPremisesUserPrincipalName string `protobuf:"bytes,26,opt,name=on_premises_user_principal_name,json=onPremisesUserPrincipalName,proto3" json:"on_premises_user_principal_name,omitempty"` + // Indicates the last time at which the object was synced with the on-premises directory; Read-only. + OnPremisesLastSyncDateTime *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` + // Errors when using synchronization during provisioning. + OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,29,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` + // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. + // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. + // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. + ExternalUserState string `protobuf:"bytes,40,opt,name=external_user_state,json=externalUserState,proto3" json:"external_user_state,omitempty"` + // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. + ExternalUserStateChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,41,opt,name=external_user_state_change_date_time,json=externalUserStateChangeDateTime,proto3" json:"external_user_state_change_date_time,omitempty"` + // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get + // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). + // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. + // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. + RefreshTokensValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=refresh_tokens_valid_from_date_time,json=refreshTokensValidFromDateTime,proto3" json:"refresh_tokens_valid_from_date_time,omitempty"` + // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get + // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). + // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. + // Read-only. Use revokeSignInSessions to reset. + SignInSessionsValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,61,opt,name=sign_in_sessions_valid_from_date_time,json=signInSessionsValidFromDateTime,proto3" json:"sign_in_sessions_valid_from_date_time,omitempty"` +} + +func (x *Account) Reset() { + *x = Account{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_accounts_v1_accounts_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 Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{0} +} + +func (x *Account) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Account) GetAccountEnabled() bool { + if x != nil { + return x.AccountEnabled + } + return false +} + +func (x *Account) GetIsResourceAccount() bool { + if x != nil { + return x.IsResourceAccount + } + return false +} + +func (x *Account) GetCreationType() string { + if x != nil { + return x.CreationType + } + return "" +} + +func (x *Account) GetIdentities() []*Identities { + if x != nil { + return x.Identities + } + return nil +} + +func (x *Account) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Account) GetPreferredName() string { + if x != nil { + return x.PreferredName + } + return "" +} + +func (x *Account) GetUidNumber() int64 { + if x != nil { + return x.UidNumber + } + return 0 +} + +func (x *Account) GetGidNumber() int64 { + if x != nil { + return x.GidNumber + } + return 0 +} + +func (x *Account) GetMail() string { + if x != nil { + return x.Mail + } + return "" +} + +func (x *Account) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Account) GetPasswordProfile() *PasswordProfile { + if x != nil { + return x.PasswordProfile + } + return nil +} + +func (x *Account) GetMemberOf() []*Group { + if x != nil { + return x.MemberOf + } + return nil +} + +func (x *Account) GetCreatedDateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreatedDateTime + } + return nil +} + +func (x *Account) GetDeletedDateTime() *timestamppb.Timestamp { + if x != nil { + return x.DeletedDateTime + } + return nil +} + +func (x *Account) GetOnPremisesSyncEnabled() bool { + if x != nil { + return x.OnPremisesSyncEnabled + } + return false +} + +func (x *Account) GetOnPremisesImmutableId() string { + if x != nil { + return x.OnPremisesImmutableId + } + return "" +} + +func (x *Account) GetOnPremisesSecurityIdentifier() string { + if x != nil { + return x.OnPremisesSecurityIdentifier + } + return "" +} + +func (x *Account) GetOnPremisesDistinguishedName() string { + if x != nil { + return x.OnPremisesDistinguishedName + } + return "" +} + +func (x *Account) GetOnPremisesSamAccountName() string { + if x != nil { + return x.OnPremisesSamAccountName + } + return "" +} + +func (x *Account) GetOnPremisesDomainName() string { + if x != nil { + return x.OnPremisesDomainName + } + return "" +} + +func (x *Account) GetOnPremisesUserPrincipalName() string { + if x != nil { + return x.OnPremisesUserPrincipalName + } + return "" +} + +func (x *Account) GetOnPremisesLastSyncDateTime() *timestamppb.Timestamp { + if x != nil { + return x.OnPremisesLastSyncDateTime + } + return nil +} + +func (x *Account) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { + if x != nil { + return x.OnPremisesProvisioningErrors + } + return nil +} + +func (x *Account) GetExternalUserState() string { + if x != nil { + return x.ExternalUserState + } + return "" +} + +func (x *Account) GetExternalUserStateChangeDateTime() *timestamppb.Timestamp { + if x != nil { + return x.ExternalUserStateChangeDateTime + } + return nil +} + +func (x *Account) GetRefreshTokensValidFromDateTime() *timestamppb.Timestamp { + if x != nil { + return x.RefreshTokensValidFromDateTime + } + return nil +} + +func (x *Account) GetSignInSessionsValidFromDateTime() *timestamppb.Timestamp { + if x != nil { + return x.SignInSessionsValidFromDateTime + } + return nil +} + +// Identities Represents an identity used to sign in to a user account. +// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. +// This enables the user to sign in to the user account with any of those associated identities. +// They are also used to keep a history of old usernames. +type Identities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. + // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. + // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. + // This property can also be set to any custom string. + SignInType string `protobuf:"bytes,1,opt,name=sign_in_type,json=signInType,proto3" json:"sign_in_type,omitempty"` + // Specifies the issuer of the identity, for example facebook.com. + // For local accounts (where signInType is not federated), this property is + // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. + // For external users from other Azure AD organization, this will be the domain of + // the federated organization, for example contoso.com. + // Supports $filter. 512 character limit. + Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` + // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). + // When *signInType* is set to: + // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address + // * `userName`, issuer_assigned_id must be a valid local part of an email address + // Supports $filter. 512 character limit. + IssuerAssignedId string `protobuf:"bytes,3,opt,name=issuer_assigned_id,json=issuerAssignedId,proto3" json:"issuer_assigned_id,omitempty"` +} + +func (x *Identities) Reset() { + *x = Identities{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Identities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identities) ProtoMessage() {} + +func (x *Identities) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_accounts_v1_accounts_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 Identities.ProtoReflect.Descriptor instead. +func (*Identities) Descriptor() ([]byte, []int) { + return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{1} +} + +func (x *Identities) GetSignInType() string { + if x != nil { + return x.SignInType + } + return "" +} + +func (x *Identities) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *Identities) GetIssuerAssignedId() string { + if x != nil { + return x.IssuerAssignedId + } + return "" +} + +type PasswordProfile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The password for the user. This property is required when a user is created. + // It can be updated, but the user will be required to change the password on the next login. + // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` + // The time when this account last changed their password. + LastPasswordChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_password_change_date_time,json=lastPasswordChangeDateTime,proto3" json:"last_password_change_date_time,omitempty"` + // Specifies password policies for the user. + //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. + // “DisablePasswordExpiration” can also be specified. + PasswordPolicies []string `protobuf:"bytes,3,rep,name=password_policies,json=passwordPolicies,proto3" json:"password_policies,omitempty"` + // *true* if the user must change her password on the next login; otherwise false. + ForceChangePasswordNextSignIn bool `protobuf:"varint,4,opt,name=force_change_password_next_sign_in,json=forceChangePasswordNextSignIn,proto3" json:"force_change_password_next_sign_in,omitempty"` + // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + ForceChangePasswordNextSignInWithMfa bool `protobuf:"varint,5,opt,name=force_change_password_next_sign_in_with_mfa,json=forceChangePasswordNextSignInWithMfa,proto3" json:"force_change_password_next_sign_in_with_mfa,omitempty"` +} + +func (x *PasswordProfile) Reset() { + *x = PasswordProfile{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PasswordProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PasswordProfile) ProtoMessage() {} + +func (x *PasswordProfile) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_accounts_v1_accounts_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 PasswordProfile.ProtoReflect.Descriptor instead. +func (*PasswordProfile) Descriptor() ([]byte, []int) { + return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{2} +} + +func (x *PasswordProfile) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *PasswordProfile) GetLastPasswordChangeDateTime() *timestamppb.Timestamp { + if x != nil { + return x.LastPasswordChangeDateTime + } + return nil +} + +func (x *PasswordProfile) GetPasswordPolicies() []string { + if x != nil { + return x.PasswordPolicies + } + return nil +} + +func (x *PasswordProfile) GetForceChangePasswordNextSignIn() bool { + if x != nil { + return x.ForceChangePasswordNextSignIn + } + return false +} + +func (x *PasswordProfile) GetForceChangePasswordNextSignInWithMfa() bool { + if x != nil { + return x.ForceChangePasswordNextSignInWithMfa + } + return false +} + +type Group struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier for the group. + // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The display name for the group. This property is required when a group is created and cannot be cleared during updates. + // Returned by default. Supports $filter and $orderby. + // groupofnames MUST cn + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // groupofnames MUST/MAY member + // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. + // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later + Members []*Account `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` + // groupofnames MAY businessCategory + // groupofnames MAY o + // groupofnames MAY ou + // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners + Owners []*Account `protobuf:"bytes,4,rep,name=owners,proto3" json:"owners,omitempty"` + // An optional description for the group. Returned by default. + // groupofnames MAY description + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + // used for exposing the user using ldap + // posixgroup MUST gidnumber + GidNumber int64 `protobuf:"varint,6,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` + // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created + // Returned by default. Read-only. + CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` + // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. + // Returned by default. Read-only. + DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` + // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. + // Returned by default. Read-only. + ExpirationDateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiration_date_time,json=expirationDateTime,proto3" json:"expiration_date_time,omitempty"` + // True if the group is not displayed in certain parts of the Outlook user interface: + // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. + // Returned only on $select. + HideFromAddressLists bool `protobuf:"varint,10,opt,name=hide_from_address_lists,json=hideFromAddressLists,proto3" json:"hide_from_address_lists,omitempty"` + // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. + // Visibility can be set only when a group is created; it is not editable. + // Returned by default. + Visibility string `protobuf:"bytes,11,opt,name=visibility,proto3" json:"visibility,omitempty"` + // *true* if this group is synced from an on-premises directory; + // *false* if this group was originally synced from an on-premises directory but is no longer synced; + // null if this object has never been synced from an on-premises directory (default). + // Returned by default. Read-only. Supports $filter. + OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` + // This property is used to associate an on-premises LDAP user to the oCIS account object. + // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. + // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. + OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` + // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. + OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` + // Contains the on-premises LDAP `distinguished name` or `DN`. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` + // Contains the on-premises `samAccountName` synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. + OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` + // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. + // Returned by default. Read-only. + OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` + // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. + // Returned by default. Read-only. + OnPremisesNetBiosName string `protobuf:"bytes,26,opt,name=on_premises_net_bios_name,json=onPremisesNetBiosName,proto3" json:"on_premises_net_bios_name,omitempty"` + // Indicates the last time at which the group was synced with the on-premises directory. + // Returned by default. Read-only. Supports $filter. + OnPremisesLastSyncDateTime string `protobuf:"bytes,27,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` + // Errors when using synchronization during provisioning. + OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,28,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` +} + +func (x *Group) Reset() { + *x = Group{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Group) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Group) ProtoMessage() {} + +func (x *Group) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_accounts_v1_accounts_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 Group.ProtoReflect.Descriptor instead. +func (*Group) Descriptor() ([]byte, []int) { + return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{3} +} + +func (x *Group) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Group) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Group) GetMembers() []*Account { + if x != nil { + return x.Members + } + return nil +} + +func (x *Group) GetOwners() []*Account { + if x != nil { + return x.Owners + } + return nil +} + +func (x *Group) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Group) GetGidNumber() int64 { + if x != nil { + return x.GidNumber + } + return 0 +} + +func (x *Group) GetCreatedDateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreatedDateTime + } + return nil +} + +func (x *Group) GetDeletedDateTime() *timestamppb.Timestamp { + if x != nil { + return x.DeletedDateTime + } + return nil +} + +func (x *Group) GetExpirationDateTime() *timestamppb.Timestamp { + if x != nil { + return x.ExpirationDateTime + } + return nil +} + +func (x *Group) GetHideFromAddressLists() bool { + if x != nil { + return x.HideFromAddressLists + } + return false +} + +func (x *Group) GetVisibility() string { + if x != nil { + return x.Visibility + } + return "" +} + +func (x *Group) GetOnPremisesSyncEnabled() bool { + if x != nil { + return x.OnPremisesSyncEnabled + } + return false +} + +func (x *Group) GetOnPremisesImmutableId() string { + if x != nil { + return x.OnPremisesImmutableId + } + return "" +} + +func (x *Group) GetOnPremisesSecurityIdentifier() string { + if x != nil { + return x.OnPremisesSecurityIdentifier + } + return "" +} + +func (x *Group) GetOnPremisesDistinguishedName() string { + if x != nil { + return x.OnPremisesDistinguishedName + } + return "" +} + +func (x *Group) GetOnPremisesSamAccountName() string { + if x != nil { + return x.OnPremisesSamAccountName + } + return "" +} + +func (x *Group) GetOnPremisesDomainName() string { + if x != nil { + return x.OnPremisesDomainName + } + return "" +} + +func (x *Group) GetOnPremisesNetBiosName() string { + if x != nil { + return x.OnPremisesNetBiosName + } + return "" +} + +func (x *Group) GetOnPremisesLastSyncDateTime() string { + if x != nil { + return x.OnPremisesLastSyncDateTime + } + return "" +} + +func (x *Group) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { + if x != nil { + return x.OnPremisesProvisioningErrors + } + return nil +} + +type OnPremisesProvisioningError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. + Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` + // The date and time at which the error occurred. + OccurredDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=occurred_date_time,json=occurredDateTime,proto3" json:"occurred_date_time,omitempty"` + // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress + PropertyCausingError string `protobuf:"bytes,3,opt,name=property_causing_error,json=propertyCausingError,proto3" json:"property_causing_error,omitempty"` + // Value of the property causing the error. + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *OnPremisesProvisioningError) Reset() { + *x = OnPremisesProvisioningError{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OnPremisesProvisioningError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OnPremisesProvisioningError) ProtoMessage() {} + +func (x *OnPremisesProvisioningError) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_accounts_v1_accounts_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 OnPremisesProvisioningError.ProtoReflect.Descriptor instead. +func (*OnPremisesProvisioningError) Descriptor() ([]byte, []int) { + return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{4} +} + +func (x *OnPremisesProvisioningError) GetCategory() string { + if x != nil { + return x.Category + } + return "" +} + +func (x *OnPremisesProvisioningError) GetOccurredDateTime() *timestamppb.Timestamp { + if x != nil { + return x.OccurredDateTime + } + return nil +} + +func (x *OnPremisesProvisioningError) GetPropertyCausingError() string { + if x != nil { + return x.PropertyCausingError + } + return "" +} + +func (x *OnPremisesProvisioningError) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +var File_ocis_messages_accounts_v1_accounts_proto protoreflect.FileDescriptor + +var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 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, 0x22, 0xcc, 0x0d, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x69, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x45, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x08, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x10, 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, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 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, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, + 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, 0x6e, + 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, + 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, + 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x1f, + 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, + 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, + 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, + 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, + 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x70, + 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, 0x65, + 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x44, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x75, + 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, + 0x69, 0x73, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5f, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, + 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1c, 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, 0x1a, 0x6f, 0x6e, 0x50, 0x72, + 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x7d, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, + 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x50, 0x72, + 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, + 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, + 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x28, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x24, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x29, 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, + 0x1f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x67, 0x0a, 0x23, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x3c, 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, 0x1e, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, + 0x6d, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x25, 0x73, 0x69, 0x67, + 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x3d, 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, 0x1f, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x74, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x49, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x2c, 0x0a, + 0x12, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x64, 0x22, 0xe0, 0x02, 0x0a, 0x0f, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x1e, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, + 0x1a, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x22, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x49, 0x6e, 0x12, 0x59, 0x0a, 0x2b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, + 0x66, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, + 0x74, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x66, 0x61, 0x22, 0x9d, + 0x09, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 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, 0x0f, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, + 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x08, 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, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x14, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 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, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x68, 0x69, 0x64, 0x65, 0x5f, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x69, 0x64, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x18, 0x6f, + 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, + 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, + 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, + 0x65, 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, + 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, + 0x65, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, + 0x73, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, + 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, + 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x18, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, + 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, + 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x38, 0x0a, 0x19, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, + 0x6e, 0x65, 0x74, 0x5f, 0x62, 0x69, 0x6f, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4e, + 0x65, 0x74, 0x42, 0x69, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x1f, 0x6f, 0x6e, + 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, + 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1a, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, + 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x7d, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xcf, + 0x01, 0x0a, 0x1b, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x12, 0x6f, 0x63, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 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, 0x10, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x5f, 0x63, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x43, 0x61, + 0x75, 0x73, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_messages_accounts_v1_accounts_proto_rawDescOnce sync.Once + file_ocis_messages_accounts_v1_accounts_proto_rawDescData = file_ocis_messages_accounts_v1_accounts_proto_rawDesc +) + +func file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP() []byte { + file_ocis_messages_accounts_v1_accounts_proto_rawDescOnce.Do(func() { + file_ocis_messages_accounts_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_accounts_v1_accounts_proto_rawDescData) + }) + return file_ocis_messages_accounts_v1_accounts_proto_rawDescData +} + +var file_ocis_messages_accounts_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_ocis_messages_accounts_v1_accounts_proto_goTypes = []interface{}{ + (*Account)(nil), // 0: ocis.messages.accounts.v1.Account + (*Identities)(nil), // 1: ocis.messages.accounts.v1.Identities + (*PasswordProfile)(nil), // 2: ocis.messages.accounts.v1.PasswordProfile + (*Group)(nil), // 3: ocis.messages.accounts.v1.Group + (*OnPremisesProvisioningError)(nil), // 4: ocis.messages.accounts.v1.OnPremisesProvisioningError + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_ocis_messages_accounts_v1_accounts_proto_depIdxs = []int32{ + 1, // 0: ocis.messages.accounts.v1.Account.identities:type_name -> ocis.messages.accounts.v1.Identities + 2, // 1: ocis.messages.accounts.v1.Account.password_profile:type_name -> ocis.messages.accounts.v1.PasswordProfile + 3, // 2: ocis.messages.accounts.v1.Account.memberOf:type_name -> ocis.messages.accounts.v1.Group + 5, // 3: ocis.messages.accounts.v1.Account.created_date_time:type_name -> google.protobuf.Timestamp + 5, // 4: ocis.messages.accounts.v1.Account.deleted_date_time:type_name -> google.protobuf.Timestamp + 5, // 5: ocis.messages.accounts.v1.Account.on_premises_last_sync_date_time:type_name -> google.protobuf.Timestamp + 4, // 6: ocis.messages.accounts.v1.Account.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v1.OnPremisesProvisioningError + 5, // 7: ocis.messages.accounts.v1.Account.external_user_state_change_date_time:type_name -> google.protobuf.Timestamp + 5, // 8: ocis.messages.accounts.v1.Account.refresh_tokens_valid_from_date_time:type_name -> google.protobuf.Timestamp + 5, // 9: ocis.messages.accounts.v1.Account.sign_in_sessions_valid_from_date_time:type_name -> google.protobuf.Timestamp + 5, // 10: ocis.messages.accounts.v1.PasswordProfile.last_password_change_date_time:type_name -> google.protobuf.Timestamp + 0, // 11: ocis.messages.accounts.v1.Group.members:type_name -> ocis.messages.accounts.v1.Account + 0, // 12: ocis.messages.accounts.v1.Group.owners:type_name -> ocis.messages.accounts.v1.Account + 5, // 13: ocis.messages.accounts.v1.Group.created_date_time:type_name -> google.protobuf.Timestamp + 5, // 14: ocis.messages.accounts.v1.Group.deleted_date_time:type_name -> google.protobuf.Timestamp + 5, // 15: ocis.messages.accounts.v1.Group.expiration_date_time:type_name -> google.protobuf.Timestamp + 4, // 16: ocis.messages.accounts.v1.Group.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v1.OnPremisesProvisioningError + 5, // 17: ocis.messages.accounts.v1.OnPremisesProvisioningError.occurred_date_time:type_name -> google.protobuf.Timestamp + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_ocis_messages_accounts_v1_accounts_proto_init() } +func file_ocis_messages_accounts_v1_accounts_proto_init() { + if File_ocis_messages_accounts_v1_accounts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_messages_accounts_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Account); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_accounts_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Identities); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_accounts_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PasswordProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_accounts_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_accounts_v1_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnPremisesProvisioningError); 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_ocis_messages_accounts_v1_accounts_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ocis_messages_accounts_v1_accounts_proto_goTypes, + DependencyIndexes: file_ocis_messages_accounts_v1_accounts_proto_depIdxs, + MessageInfos: file_ocis_messages_accounts_v1_accounts_proto_msgTypes, + }.Build() + File_ocis_messages_accounts_v1_accounts_proto = out.File + file_ocis_messages_accounts_v1_accounts_proto_rawDesc = nil + file_ocis_messages_accounts_v1_accounts_proto_goTypes = nil + file_ocis_messages_accounts_v1_accounts_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go new file mode 100644 index 00000000000..35dd36abe91 --- /dev/null +++ b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go @@ -0,0 +1,16 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/messages/accounts/v1/accounts.proto + +package v1 + +import ( + fmt "fmt" + proto "google.golang.org/protobuf/proto" + _ "google.golang.org/protobuf/types/known/timestamppb" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go new file mode 100644 index 00000000000..936cee72374 --- /dev/null +++ b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-microweb. DO NOT EDIT. +// source: v1.proto + +package v1 + +import ( + "bytes" + "encoding/json" + + "github.com/golang/protobuf/jsonpb" +) + +// AccountJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Account. This struct is safe to replace or modify but +// should not be done so concurrently. +var AccountJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Account) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AccountJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Account)(nil) + +// AccountJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Account. This struct is safe to replace or modify but +// should not be done so concurrently. +var AccountJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Account) UnmarshalJSON(b []byte) error { + return AccountJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Account)(nil) + +// IdentitiesJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Identities. This struct is safe to replace or modify but +// should not be done so concurrently. +var IdentitiesJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Identities) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := IdentitiesJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Identities)(nil) + +// IdentitiesJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Identities. This struct is safe to replace or modify but +// should not be done so concurrently. +var IdentitiesJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Identities) UnmarshalJSON(b []byte) error { + return IdentitiesJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Identities)(nil) + +// PasswordProfileJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of PasswordProfile. This struct is safe to replace or modify but +// should not be done so concurrently. +var PasswordProfileJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *PasswordProfile) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := PasswordProfileJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*PasswordProfile)(nil) + +// PasswordProfileJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of PasswordProfile. This struct is safe to replace or modify but +// should not be done so concurrently. +var PasswordProfileJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *PasswordProfile) UnmarshalJSON(b []byte) error { + return PasswordProfileJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*PasswordProfile)(nil) + +// GroupJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Group. This struct is safe to replace or modify but +// should not be done so concurrently. +var GroupJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Group) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GroupJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Group)(nil) + +// GroupJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Group. This struct is safe to replace or modify but +// should not be done so concurrently. +var GroupJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Group) UnmarshalJSON(b []byte) error { + return GroupJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Group)(nil) + +// OnPremisesProvisioningErrorJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but +// should not be done so concurrently. +var OnPremisesProvisioningErrorJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *OnPremisesProvisioningError) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := OnPremisesProvisioningErrorJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*OnPremisesProvisioningError)(nil) + +// OnPremisesProvisioningErrorJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but +// should not be done so concurrently. +var OnPremisesProvisioningErrorJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *OnPremisesProvisioningError) UnmarshalJSON(b []byte) error { + return OnPremisesProvisioningErrorJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*OnPremisesProvisioningError)(nil) diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json new file mode 100644 index 00000000000..2b36629592a --- /dev/null +++ b/protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "ocis/messages/accounts/v1/accounts.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go new file mode 100644 index 00000000000..1a4389c67f5 --- /dev/null +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go @@ -0,0 +1,1680 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/services/accounts/v1/accounts.proto + +package v1 + +import ( + v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + 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) +) + +type RebuildIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RebuildIndexRequest) Reset() { + *x = RebuildIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RebuildIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebuildIndexRequest) ProtoMessage() {} + +func (x *RebuildIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 RebuildIndexRequest.ProtoReflect.Descriptor instead. +func (*RebuildIndexRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{0} +} + +type RebuildIndexResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RebuildIndexResponse) Reset() { + *x = RebuildIndexResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RebuildIndexResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RebuildIndexResponse) ProtoMessage() {} + +func (x *RebuildIndexResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 RebuildIndexResponse.ProtoReflect.Descriptor instead. +func (*RebuildIndexResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{1} +} + +type ListAccountsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The maximum number of accounts to return in the response + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Optional. Search criteria used to select the accounts to return. + // If no search criteria is specified then all accounts will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `email=foo@example.com` returns accounts with + // `email` set to `foo@example.com` + // * Query `display_name=\\"Test String\\"` returns accounts with + // display names that include both "Test" and "String" + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *ListAccountsRequest) Reset() { + *x = ListAccountsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsRequest) ProtoMessage() {} + +func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 ListAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListAccountsRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{2} +} + +func (x *ListAccountsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAccountsRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *ListAccountsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type ListAccountsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The field name should match the noun "accounts" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + Accounts []*v1.Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListAccountsResponse) Reset() { + *x = ListAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsResponse) ProtoMessage() {} + +func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 ListAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListAccountsResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{3} +} + +func (x *ListAccountsResponse) GetAccounts() []*v1.Account { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *ListAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type GetAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetAccountRequest) Reset() { + *x = GetAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountRequest) ProtoMessage() {} + +func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 GetAccountRequest.ProtoReflect.Descriptor instead. +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{4} +} + +func (x *GetAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type CreateAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The account resource to create + Account *v1.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *CreateAccountRequest) Reset() { + *x = CreateAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountRequest) ProtoMessage() {} + +func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 CreateAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateAccountRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateAccountRequest) GetAccount() *v1.Account { + if x != nil { + return x.Account + } + return nil +} + +type UpdateAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The account resource which replaces the resource on the server + Account *v1.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // The update mask applies to the resource. For the `FieldMask` definition, + // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateAccountRequest) Reset() { + *x = UpdateAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccountRequest) ProtoMessage() {} + +func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 UpdateAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{6} +} + +func (x *UpdateAccountRequest) GetAccount() *v1.Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *UpdateAccountRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type DeleteAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteAccountRequest) Reset() { + *x = DeleteAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountRequest) ProtoMessage() {} + +func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 DeleteAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListGroupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The maximum number of groups to return in the response + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Optional. Search criteria used to select the groups to return. + // If no search criteria is specified then all groups will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `display_name=\\"Test String\\"` returns groups with + // display names that include both "Test" and "String" + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *ListGroupsRequest) Reset() { + *x = ListGroupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsRequest) ProtoMessage() {} + +func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 ListGroupsRequest.ProtoReflect.Descriptor instead. +func (*ListGroupsRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{8} +} + +func (x *ListGroupsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListGroupsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListGroupsRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *ListGroupsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type ListGroupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The field name should match the noun "group" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + Groups []*v1.Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListGroupsResponse) Reset() { + *x = ListGroupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListGroupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListGroupsResponse) ProtoMessage() {} + +func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 ListGroupsResponse.ProtoReflect.Descriptor instead. +func (*ListGroupsResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{9} +} + +func (x *ListGroupsResponse) GetGroups() []*v1.Group { + if x != nil { + return x.Groups + } + return nil +} + +func (x *ListGroupsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +type GetGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetGroupRequest) Reset() { + *x = GetGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupRequest) ProtoMessage() {} + +func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 GetGroupRequest.ProtoReflect.Descriptor instead. +func (*GetGroupRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{10} +} + +func (x *GetGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type CreateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The account resource to create + Group *v1.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` +} + +func (x *CreateGroupRequest) Reset() { + *x = CreateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateGroupRequest) ProtoMessage() {} + +func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 CreateGroupRequest.ProtoReflect.Descriptor instead. +func (*CreateGroupRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateGroupRequest) GetGroup() *v1.Group { + if x != nil { + return x.Group + } + return nil +} + +type UpdateGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The group resource which replaces the resource on the server + Group *v1.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + // The update mask applies to the resource. For the `FieldMask` definition, + // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateGroupRequest) Reset() { + *x = UpdateGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateGroupRequest) ProtoMessage() {} + +func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 UpdateGroupRequest.ProtoReflect.Descriptor instead. +func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateGroupRequest) GetGroup() *v1.Group { + if x != nil { + return x.Group + } + return nil +} + +func (x *UpdateGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type DeleteGroupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteGroupRequest) Reset() { + *x = DeleteGroupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteGroupRequest) ProtoMessage() {} + +func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_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 DeleteGroupRequest.ProtoReflect.Descriptor instead. +func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteGroupRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type AddMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The id of the group to add a member to + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // The account id to add + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` +} + +func (x *AddMemberRequest) Reset() { + *x = AddMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddMemberRequest) ProtoMessage() {} + +func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[14] + 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 AddMemberRequest.ProtoReflect.Descriptor instead. +func (*AddMemberRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{14} +} + +func (x *AddMemberRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +func (x *AddMemberRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type RemoveMemberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The id of the group to remove a member from + GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + // The account id to remove + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` +} + +func (x *RemoveMemberRequest) Reset() { + *x = RemoveMemberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveMemberRequest) ProtoMessage() {} + +func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[15] + 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 RemoveMemberRequest.ProtoReflect.Descriptor instead. +func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{15} +} + +func (x *RemoveMemberRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +func (x *RemoveMemberRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type ListMembersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + // Optional. Search criteria used to select the groups to return. + // If no search criteria is specified then all groups will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `display_name=\\"Test String\\"` returns groups with + // display names that include both "Test" and "String" + Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` + // The id of the group to list members from + Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ListMembersRequest) Reset() { + *x = ListMembersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersRequest) ProtoMessage() {} + +func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[16] + 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 ListMembersRequest.ProtoReflect.Descriptor instead. +func (*ListMembersRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{16} +} + +func (x *ListMembersRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListMembersRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListMembersRequest) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *ListMembersRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *ListMembersRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListMembersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The field name should match the noun "members" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + Members []*v1.Account `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListMembersResponse) Reset() { + *x = ListMembersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListMembersResponse) ProtoMessage() {} + +func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[17] + 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 ListMembersResponse.ProtoReflect.Descriptor instead. +func (*ListMembersResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{17} +} + +func (x *ListMembersResponse) GetMembers() []*v1.Account { + if x != nil { + return x.Members + } + return nil +} + +func (x *ListMembersResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_ocis_services_accounts_v1_accounts_proto protoreflect.FileDescriptor + +var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 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, 0x1b, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 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, 0x22, 0x15, 0x0a, + 0x13, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, 0x01, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, + 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x22, 0x7e, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, + 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 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, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb2, 0x01, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, + 0x76, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x12, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x36, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x36, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 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, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x41, 0x64, + 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x7b, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xe9, 0x05, 0x0a, + 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x9a, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x88, 0x01, + 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0x95, 0x09, 0x0a, 0x0d, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, + 0x80, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, + 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x89, + 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, + 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8f, 0x01, 0x0a, 0x09, + 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, + 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2e, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, + 0x01, 0x2a, 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, + 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, + 0x32, 0xa2, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x66, 0x61, 0x6e, 0x65, 0x7a, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x30, 0x30, 0x31, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_ocis_services_accounts_v1_accounts_proto_rawDescOnce sync.Once + file_ocis_services_accounts_v1_accounts_proto_rawDescData = file_ocis_services_accounts_v1_accounts_proto_rawDesc +) + +func file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP() []byte { + file_ocis_services_accounts_v1_accounts_proto_rawDescOnce.Do(func() { + file_ocis_services_accounts_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_accounts_v1_accounts_proto_rawDescData) + }) + return file_ocis_services_accounts_v1_accounts_proto_rawDescData +} + +var file_ocis_services_accounts_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_ocis_services_accounts_v1_accounts_proto_goTypes = []interface{}{ + (*RebuildIndexRequest)(nil), // 0: ocis.services.accounts.v1.RebuildIndexRequest + (*RebuildIndexResponse)(nil), // 1: ocis.services.accounts.v1.RebuildIndexResponse + (*ListAccountsRequest)(nil), // 2: ocis.services.accounts.v1.ListAccountsRequest + (*ListAccountsResponse)(nil), // 3: ocis.services.accounts.v1.ListAccountsResponse + (*GetAccountRequest)(nil), // 4: ocis.services.accounts.v1.GetAccountRequest + (*CreateAccountRequest)(nil), // 5: ocis.services.accounts.v1.CreateAccountRequest + (*UpdateAccountRequest)(nil), // 6: ocis.services.accounts.v1.UpdateAccountRequest + (*DeleteAccountRequest)(nil), // 7: ocis.services.accounts.v1.DeleteAccountRequest + (*ListGroupsRequest)(nil), // 8: ocis.services.accounts.v1.ListGroupsRequest + (*ListGroupsResponse)(nil), // 9: ocis.services.accounts.v1.ListGroupsResponse + (*GetGroupRequest)(nil), // 10: ocis.services.accounts.v1.GetGroupRequest + (*CreateGroupRequest)(nil), // 11: ocis.services.accounts.v1.CreateGroupRequest + (*UpdateGroupRequest)(nil), // 12: ocis.services.accounts.v1.UpdateGroupRequest + (*DeleteGroupRequest)(nil), // 13: ocis.services.accounts.v1.DeleteGroupRequest + (*AddMemberRequest)(nil), // 14: ocis.services.accounts.v1.AddMemberRequest + (*RemoveMemberRequest)(nil), // 15: ocis.services.accounts.v1.RemoveMemberRequest + (*ListMembersRequest)(nil), // 16: ocis.services.accounts.v1.ListMembersRequest + (*ListMembersResponse)(nil), // 17: ocis.services.accounts.v1.ListMembersResponse + (*fieldmaskpb.FieldMask)(nil), // 18: google.protobuf.FieldMask + (*v1.Account)(nil), // 19: ocis.messages.accounts.v1.Account + (*v1.Group)(nil), // 20: ocis.messages.accounts.v1.Group + (*emptypb.Empty)(nil), // 21: google.protobuf.Empty +} +var file_ocis_services_accounts_v1_accounts_proto_depIdxs = []int32{ + 18, // 0: ocis.services.accounts.v1.ListAccountsRequest.field_mask:type_name -> google.protobuf.FieldMask + 19, // 1: ocis.services.accounts.v1.ListAccountsResponse.accounts:type_name -> ocis.messages.accounts.v1.Account + 19, // 2: ocis.services.accounts.v1.CreateAccountRequest.account:type_name -> ocis.messages.accounts.v1.Account + 19, // 3: ocis.services.accounts.v1.UpdateAccountRequest.account:type_name -> ocis.messages.accounts.v1.Account + 18, // 4: ocis.services.accounts.v1.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 5: ocis.services.accounts.v1.ListGroupsRequest.field_mask:type_name -> google.protobuf.FieldMask + 20, // 6: ocis.services.accounts.v1.ListGroupsResponse.groups:type_name -> ocis.messages.accounts.v1.Group + 20, // 7: ocis.services.accounts.v1.CreateGroupRequest.group:type_name -> ocis.messages.accounts.v1.Group + 20, // 8: ocis.services.accounts.v1.UpdateGroupRequest.group:type_name -> ocis.messages.accounts.v1.Group + 18, // 9: ocis.services.accounts.v1.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 10: ocis.services.accounts.v1.ListMembersRequest.field_mask:type_name -> google.protobuf.FieldMask + 19, // 11: ocis.services.accounts.v1.ListMembersResponse.members:type_name -> ocis.messages.accounts.v1.Account + 2, // 12: ocis.services.accounts.v1.AccountsService.ListAccounts:input_type -> ocis.services.accounts.v1.ListAccountsRequest + 4, // 13: ocis.services.accounts.v1.AccountsService.GetAccount:input_type -> ocis.services.accounts.v1.GetAccountRequest + 5, // 14: ocis.services.accounts.v1.AccountsService.CreateAccount:input_type -> ocis.services.accounts.v1.CreateAccountRequest + 6, // 15: ocis.services.accounts.v1.AccountsService.UpdateAccount:input_type -> ocis.services.accounts.v1.UpdateAccountRequest + 7, // 16: ocis.services.accounts.v1.AccountsService.DeleteAccount:input_type -> ocis.services.accounts.v1.DeleteAccountRequest + 8, // 17: ocis.services.accounts.v1.GroupsService.ListGroups:input_type -> ocis.services.accounts.v1.ListGroupsRequest + 10, // 18: ocis.services.accounts.v1.GroupsService.GetGroup:input_type -> ocis.services.accounts.v1.GetGroupRequest + 11, // 19: ocis.services.accounts.v1.GroupsService.CreateGroup:input_type -> ocis.services.accounts.v1.CreateGroupRequest + 12, // 20: ocis.services.accounts.v1.GroupsService.UpdateGroup:input_type -> ocis.services.accounts.v1.UpdateGroupRequest + 13, // 21: ocis.services.accounts.v1.GroupsService.DeleteGroup:input_type -> ocis.services.accounts.v1.DeleteGroupRequest + 14, // 22: ocis.services.accounts.v1.GroupsService.AddMember:input_type -> ocis.services.accounts.v1.AddMemberRequest + 15, // 23: ocis.services.accounts.v1.GroupsService.RemoveMember:input_type -> ocis.services.accounts.v1.RemoveMemberRequest + 16, // 24: ocis.services.accounts.v1.GroupsService.ListMembers:input_type -> ocis.services.accounts.v1.ListMembersRequest + 0, // 25: ocis.services.accounts.v1.IndexService.RebuildIndex:input_type -> ocis.services.accounts.v1.RebuildIndexRequest + 3, // 26: ocis.services.accounts.v1.AccountsService.ListAccounts:output_type -> ocis.services.accounts.v1.ListAccountsResponse + 19, // 27: ocis.services.accounts.v1.AccountsService.GetAccount:output_type -> ocis.messages.accounts.v1.Account + 19, // 28: ocis.services.accounts.v1.AccountsService.CreateAccount:output_type -> ocis.messages.accounts.v1.Account + 19, // 29: ocis.services.accounts.v1.AccountsService.UpdateAccount:output_type -> ocis.messages.accounts.v1.Account + 21, // 30: ocis.services.accounts.v1.AccountsService.DeleteAccount:output_type -> google.protobuf.Empty + 9, // 31: ocis.services.accounts.v1.GroupsService.ListGroups:output_type -> ocis.services.accounts.v1.ListGroupsResponse + 20, // 32: ocis.services.accounts.v1.GroupsService.GetGroup:output_type -> ocis.messages.accounts.v1.Group + 20, // 33: ocis.services.accounts.v1.GroupsService.CreateGroup:output_type -> ocis.messages.accounts.v1.Group + 20, // 34: ocis.services.accounts.v1.GroupsService.UpdateGroup:output_type -> ocis.messages.accounts.v1.Group + 21, // 35: ocis.services.accounts.v1.GroupsService.DeleteGroup:output_type -> google.protobuf.Empty + 20, // 36: ocis.services.accounts.v1.GroupsService.AddMember:output_type -> ocis.messages.accounts.v1.Group + 20, // 37: ocis.services.accounts.v1.GroupsService.RemoveMember:output_type -> ocis.messages.accounts.v1.Group + 17, // 38: ocis.services.accounts.v1.GroupsService.ListMembers:output_type -> ocis.services.accounts.v1.ListMembersResponse + 1, // 39: ocis.services.accounts.v1.IndexService.RebuildIndex:output_type -> ocis.services.accounts.v1.RebuildIndexResponse + 26, // [26:40] is the sub-list for method output_type + 12, // [12:26] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_ocis_services_accounts_v1_accounts_proto_init() } +func file_ocis_services_accounts_v1_accounts_proto_init() { + if File_ocis_services_accounts_v1_accounts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_services_accounts_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RebuildIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RebuildIndexResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMembersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_accounts_v1_accounts_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListMembersResponse); 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_ocis_services_accounts_v1_accounts_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 3, + }, + GoTypes: file_ocis_services_accounts_v1_accounts_proto_goTypes, + DependencyIndexes: file_ocis_services_accounts_v1_accounts_proto_depIdxs, + MessageInfos: file_ocis_services_accounts_v1_accounts_proto_msgTypes, + }.Build() + File_ocis_services_accounts_v1_accounts_proto = out.File + file_ocis_services_accounts_v1_accounts_proto_rawDesc = nil + file_ocis_services_accounts_v1_accounts_proto_goTypes = nil + file_ocis_services_accounts_v1_accounts_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go new file mode 100644 index 00000000000..5bf98c44aaf --- /dev/null +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go @@ -0,0 +1,627 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/services/accounts/v1/accounts.proto + +package v1 + +import ( + fmt "fmt" + v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + proto "google.golang.org/protobuf/proto" + emptypb "google.golang.org/protobuf/types/known/emptypb" + _ "google.golang.org/protobuf/types/known/fieldmaskpb" + math "math" +) + +import ( + context "context" + api "go-micro.dev/v4/api" + client "go-micro.dev/v4/client" + server "go-micro.dev/v4/server" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// Reference imports to suppress errors if they are not otherwise used. +var _ api.Endpoint +var _ context.Context +var _ client.Option +var _ server.Option + +// Api Endpoints for AccountsService service + +func NewAccountsServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "AccountsService.ListAccounts", + Path: []string{"/api/v1/accounts/accounts-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "AccountsService.GetAccount", + Path: []string{"/api/v1/accounts/accounts-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "AccountsService.CreateAccount", + Path: []string{"/api/v1/accounts/accounts-create"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "AccountsService.UpdateAccount", + Path: []string{"/api/v1/accounts/accounts-update"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "AccountsService.DeleteAccount", + Path: []string{"/api/v1/accounts/accounts-delete"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for AccountsService service + +type AccountsService interface { + // Lists accounts + ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) + // Gets an account + //rpc GetAccount(GetAccountRequest) returns (Account) { + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v1.Account, error) + // Creates an account + //rpc CreateAccount(CreateAccountRequest) returns (Account) { + CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v1.Account, error) + // Updates an account + //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v1.Account, error) + // Deletes an account + DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) +} + +type accountsService struct { + c client.Client + name string +} + +func NewAccountsService(name string, c client.Client) AccountsService { + return &accountsService{ + c: c, + name: name, + } +} + +func (c *accountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { + req := c.c.NewRequest(c.name, "AccountsService.ListAccounts", in) + out := new(ListAccountsResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v1.Account, error) { + req := c.c.NewRequest(c.name, "AccountsService.GetAccount", in) + out := new(v1.Account) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v1.Account, error) { + req := c.c.NewRequest(c.name, "AccountsService.CreateAccount", in) + out := new(v1.Account) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v1.Account, error) { + req := c.c.NewRequest(c.name, "AccountsService.UpdateAccount", in) + out := new(v1.Account) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + req := c.c.NewRequest(c.name, "AccountsService.DeleteAccount", in) + out := new(emptypb.Empty) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for AccountsService service + +type AccountsServiceHandler interface { + // Lists accounts + ListAccounts(context.Context, *ListAccountsRequest, *ListAccountsResponse) error + // Gets an account + //rpc GetAccount(GetAccountRequest) returns (Account) { + GetAccount(context.Context, *GetAccountRequest, *v1.Account) error + // Creates an account + //rpc CreateAccount(CreateAccountRequest) returns (Account) { + CreateAccount(context.Context, *CreateAccountRequest, *v1.Account) error + // Updates an account + //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + UpdateAccount(context.Context, *UpdateAccountRequest, *v1.Account) error + // Deletes an account + DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error +} + +func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler, opts ...server.HandlerOption) error { + type accountsService interface { + ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error + GetAccount(ctx context.Context, in *GetAccountRequest, out *v1.Account) error + CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v1.Account) error + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v1.Account) error + DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error + } + type AccountsService struct { + accountsService + } + h := &accountsServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "AccountsService.ListAccounts", + Path: []string{"/api/v1/accounts/accounts-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "AccountsService.GetAccount", + Path: []string{"/api/v1/accounts/accounts-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "AccountsService.CreateAccount", + Path: []string{"/api/v1/accounts/accounts-create"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "AccountsService.UpdateAccount", + Path: []string{"/api/v1/accounts/accounts-update"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "AccountsService.DeleteAccount", + Path: []string{"/api/v1/accounts/accounts-delete"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&AccountsService{h}, opts...)) +} + +type accountsServiceHandler struct { + AccountsServiceHandler +} + +func (h *accountsServiceHandler) ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error { + return h.AccountsServiceHandler.ListAccounts(ctx, in, out) +} + +func (h *accountsServiceHandler) GetAccount(ctx context.Context, in *GetAccountRequest, out *v1.Account) error { + return h.AccountsServiceHandler.GetAccount(ctx, in, out) +} + +func (h *accountsServiceHandler) CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v1.Account) error { + return h.AccountsServiceHandler.CreateAccount(ctx, in, out) +} + +func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v1.Account) error { + return h.AccountsServiceHandler.UpdateAccount(ctx, in, out) +} + +func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error { + return h.AccountsServiceHandler.DeleteAccount(ctx, in, out) +} + +// Api Endpoints for GroupsService service + +func NewGroupsServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "GroupsService.ListGroups", + Path: []string{"/api/v1/accounts/groups-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.GetGroup", + Path: []string{"/api/v1/accounts/groups-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.CreateGroup", + Path: []string{"/api/v1/accounts/groups-create"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.UpdateGroup", + Path: []string{"/api/v1/accounts/groups-update"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.DeleteGroup", + Path: []string{"/api/v1/accounts/groups-delete"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.AddMember", + Path: []string{"/api/v1/groups/{group_id=*}/members/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.RemoveMember", + Path: []string{"/api/v1/groups/{group_id=*}/members/{account_id}/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "GroupsService.ListMembers", + Path: []string{"/api/v1/groups/{id=*}/members/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for GroupsService service + +type GroupsService interface { + // Lists groups + ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) + // Gets an groups + GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v1.Group, error) + // Creates a group + CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v1.Group, error) + // Updates a group + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v1.Group, error) + // Deletes a group + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) + // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http + AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v1.Group, error) + // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 + RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v1.Group, error) + // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 + ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) +} + +type groupsService struct { + c client.Client + name string +} + +func NewGroupsService(name string, c client.Client) GroupsService { + return &groupsService{ + c: c, + name: name, + } +} + +func (c *groupsService) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) { + req := c.c.NewRequest(c.name, "GroupsService.ListGroups", in) + out := new(ListGroupsResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v1.Group, error) { + req := c.c.NewRequest(c.name, "GroupsService.GetGroup", in) + out := new(v1.Group) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v1.Group, error) { + req := c.c.NewRequest(c.name, "GroupsService.CreateGroup", in) + out := new(v1.Group) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v1.Group, error) { + req := c.c.NewRequest(c.name, "GroupsService.UpdateGroup", in) + out := new(v1.Group) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + req := c.c.NewRequest(c.name, "GroupsService.DeleteGroup", in) + out := new(emptypb.Empty) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v1.Group, error) { + req := c.c.NewRequest(c.name, "GroupsService.AddMember", in) + out := new(v1.Group) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v1.Group, error) { + req := c.c.NewRequest(c.name, "GroupsService.RemoveMember", in) + out := new(v1.Group) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *groupsService) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) { + req := c.c.NewRequest(c.name, "GroupsService.ListMembers", in) + out := new(ListMembersResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for GroupsService service + +type GroupsServiceHandler interface { + // Lists groups + ListGroups(context.Context, *ListGroupsRequest, *ListGroupsResponse) error + // Gets an groups + GetGroup(context.Context, *GetGroupRequest, *v1.Group) error + // Creates a group + CreateGroup(context.Context, *CreateGroupRequest, *v1.Group) error + // Updates a group + UpdateGroup(context.Context, *UpdateGroupRequest, *v1.Group) error + // Deletes a group + DeleteGroup(context.Context, *DeleteGroupRequest, *emptypb.Empty) error + // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http + AddMember(context.Context, *AddMemberRequest, *v1.Group) error + // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 + RemoveMember(context.Context, *RemoveMemberRequest, *v1.Group) error + // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 + ListMembers(context.Context, *ListMembersRequest, *ListMembersResponse) error +} + +func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, opts ...server.HandlerOption) error { + type groupsService interface { + ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error + GetGroup(ctx context.Context, in *GetGroupRequest, out *v1.Group) error + CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v1.Group) error + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v1.Group) error + DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error + AddMember(ctx context.Context, in *AddMemberRequest, out *v1.Group) error + RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v1.Group) error + ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error + } + type GroupsService struct { + groupsService + } + h := &groupsServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.ListGroups", + Path: []string{"/api/v1/accounts/groups-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.GetGroup", + Path: []string{"/api/v1/accounts/groups-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.CreateGroup", + Path: []string{"/api/v1/accounts/groups-create"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.UpdateGroup", + Path: []string{"/api/v1/accounts/groups-update"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.DeleteGroup", + Path: []string{"/api/v1/accounts/groups-delete"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.AddMember", + Path: []string{"/api/v1/groups/{group_id=*}/members/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.RemoveMember", + Path: []string{"/api/v1/groups/{group_id=*}/members/{account_id}/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "GroupsService.ListMembers", + Path: []string{"/api/v1/groups/{id=*}/members/$ref"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&GroupsService{h}, opts...)) +} + +type groupsServiceHandler struct { + GroupsServiceHandler +} + +func (h *groupsServiceHandler) ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error { + return h.GroupsServiceHandler.ListGroups(ctx, in, out) +} + +func (h *groupsServiceHandler) GetGroup(ctx context.Context, in *GetGroupRequest, out *v1.Group) error { + return h.GroupsServiceHandler.GetGroup(ctx, in, out) +} + +func (h *groupsServiceHandler) CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v1.Group) error { + return h.GroupsServiceHandler.CreateGroup(ctx, in, out) +} + +func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v1.Group) error { + return h.GroupsServiceHandler.UpdateGroup(ctx, in, out) +} + +func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error { + return h.GroupsServiceHandler.DeleteGroup(ctx, in, out) +} + +func (h *groupsServiceHandler) AddMember(ctx context.Context, in *AddMemberRequest, out *v1.Group) error { + return h.GroupsServiceHandler.AddMember(ctx, in, out) +} + +func (h *groupsServiceHandler) RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v1.Group) error { + return h.GroupsServiceHandler.RemoveMember(ctx, in, out) +} + +func (h *groupsServiceHandler) ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error { + return h.GroupsServiceHandler.ListMembers(ctx, in, out) +} + +// Api Endpoints for IndexService service + +func NewIndexServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "IndexService.RebuildIndex", + Path: []string{"/api/v1/index/rebuild"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for IndexService service + +type IndexService interface { + RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) +} + +type indexService struct { + c client.Client + name string +} + +func NewIndexService(name string, c client.Client) IndexService { + return &indexService{ + c: c, + name: name, + } +} + +func (c *indexService) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) { + req := c.c.NewRequest(c.name, "IndexService.RebuildIndex", in) + out := new(RebuildIndexResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for IndexService service + +type IndexServiceHandler interface { + RebuildIndex(context.Context, *RebuildIndexRequest, *RebuildIndexResponse) error +} + +func RegisterIndexServiceHandler(s server.Server, hdlr IndexServiceHandler, opts ...server.HandlerOption) error { + type indexService interface { + RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error + } + type IndexService struct { + indexService + } + h := &indexServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "IndexService.RebuildIndex", + Path: []string{"/api/v1/index/rebuild"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&IndexService{h}, opts...)) +} + +type indexServiceHandler struct { + IndexServiceHandler +} + +func (h *indexServiceHandler) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error { + return h.IndexServiceHandler.RebuildIndex(ctx, in, out) +} diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go new file mode 100644 index 00000000000..e0db958c8da --- /dev/null +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go @@ -0,0 +1,1038 @@ +// Code generated by protoc-gen-microweb. DO NOT EDIT. +// source: v1.proto + +package v1 + +import ( + "bytes" + "encoding/json" + "net/http" + + "github.com/go-chi/chi/v5" + "github.com/go-chi/render" + "github.com/golang/protobuf/jsonpb" + + ptypesempty "github.com/golang/protobuf/ptypes/empty" + accountsv1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" +) + +type webAccountsServiceHandler struct { + r chi.Router + h AccountsServiceHandler +} + +func (h *webAccountsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webAccountsServiceHandler) ListAccounts(w http.ResponseWriter, r *http.Request) { + req := &ListAccountsRequest{} + resp := &ListAccountsResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListAccounts( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webAccountsServiceHandler) GetAccount(w http.ResponseWriter, r *http.Request) { + req := &GetAccountRequest{} + resp := &accountsv1.Account{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetAccount( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webAccountsServiceHandler) CreateAccount(w http.ResponseWriter, r *http.Request) { + req := &CreateAccountRequest{} + resp := &accountsv1.Account{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.CreateAccount( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webAccountsServiceHandler) UpdateAccount(w http.ResponseWriter, r *http.Request) { + req := &UpdateAccountRequest{} + resp := &accountsv1.Account{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.UpdateAccount( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webAccountsServiceHandler) DeleteAccount(w http.ResponseWriter, r *http.Request) { + req := &DeleteAccountRequest{} + resp := &ptypesempty.Empty{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.DeleteAccount( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusNoContent) + render.NoContent(w, r) +} + +func RegisterAccountsServiceWeb(r chi.Router, i AccountsServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webAccountsServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/accounts/accounts-list", handler.ListAccounts) + r.MethodFunc("POST", "/api/v1/accounts/accounts-get", handler.GetAccount) + r.MethodFunc("POST", "/api/v1/accounts/accounts-create", handler.CreateAccount) + r.MethodFunc("POST", "/api/v1/accounts/accounts-update", handler.UpdateAccount) + r.MethodFunc("POST", "/api/v1/accounts/accounts-delete", handler.DeleteAccount) +} + +type webGroupsServiceHandler struct { + r chi.Router + h GroupsServiceHandler +} + +func (h *webGroupsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webGroupsServiceHandler) ListGroups(w http.ResponseWriter, r *http.Request) { + req := &ListGroupsRequest{} + resp := &ListGroupsResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListGroups( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) GetGroup(w http.ResponseWriter, r *http.Request) { + req := &GetGroupRequest{} + resp := &accountsv1.Group{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetGroup( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) CreateGroup(w http.ResponseWriter, r *http.Request) { + req := &CreateGroupRequest{} + resp := &accountsv1.Group{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.CreateGroup( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) UpdateGroup(w http.ResponseWriter, r *http.Request) { + req := &UpdateGroupRequest{} + resp := &accountsv1.Group{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.UpdateGroup( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) DeleteGroup(w http.ResponseWriter, r *http.Request) { + req := &DeleteGroupRequest{} + resp := &ptypesempty.Empty{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.DeleteGroup( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusNoContent) + render.NoContent(w, r) +} + +func (h *webGroupsServiceHandler) AddMember(w http.ResponseWriter, r *http.Request) { + req := &AddMemberRequest{} + resp := &accountsv1.Group{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.AddMember( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) RemoveMember(w http.ResponseWriter, r *http.Request) { + req := &RemoveMemberRequest{} + resp := &accountsv1.Group{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.RemoveMember( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webGroupsServiceHandler) ListMembers(w http.ResponseWriter, r *http.Request) { + req := &ListMembersRequest{} + resp := &ListMembersResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListMembers( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func RegisterGroupsServiceWeb(r chi.Router, i GroupsServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webGroupsServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/accounts/groups-list", handler.ListGroups) + r.MethodFunc("POST", "/api/v1/accounts/groups-get", handler.GetGroup) + r.MethodFunc("POST", "/api/v1/accounts/groups-create", handler.CreateGroup) + r.MethodFunc("POST", "/api/v1/accounts/groups-update", handler.UpdateGroup) + r.MethodFunc("POST", "/api/v1/accounts/groups-delete", handler.DeleteGroup) + r.MethodFunc("POST", "/api/v1/groups/{group_id=*}/members/$ref", handler.AddMember) + r.MethodFunc("POST", "/api/v1/groups/{group_id=*}/members/{account_id}/$ref", handler.RemoveMember) + r.MethodFunc("POST", "/api/v1/groups/{id=*}/members/$ref", handler.ListMembers) +} + +type webIndexServiceHandler struct { + r chi.Router + h IndexServiceHandler +} + +func (h *webIndexServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webIndexServiceHandler) RebuildIndex(w http.ResponseWriter, r *http.Request) { + req := &RebuildIndexRequest{} + resp := &RebuildIndexResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.RebuildIndex( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func RegisterIndexServiceWeb(r chi.Router, i IndexServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webIndexServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/index/rebuild", handler.RebuildIndex) +} + +// RebuildIndexRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of RebuildIndexRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RebuildIndexRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *RebuildIndexRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := RebuildIndexRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*RebuildIndexRequest)(nil) + +// RebuildIndexRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of RebuildIndexRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RebuildIndexRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *RebuildIndexRequest) UnmarshalJSON(b []byte) error { + return RebuildIndexRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*RebuildIndexRequest)(nil) + +// RebuildIndexResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of RebuildIndexResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var RebuildIndexResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *RebuildIndexResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := RebuildIndexResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*RebuildIndexResponse)(nil) + +// RebuildIndexResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of RebuildIndexResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var RebuildIndexResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *RebuildIndexResponse) UnmarshalJSON(b []byte) error { + return RebuildIndexResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*RebuildIndexResponse)(nil) + +// ListAccountsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListAccountsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListAccountsRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListAccountsRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListAccountsRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListAccountsRequest)(nil) + +// ListAccountsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListAccountsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListAccountsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListAccountsRequest) UnmarshalJSON(b []byte) error { + return ListAccountsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListAccountsRequest)(nil) + +// ListAccountsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListAccountsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListAccountsResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListAccountsResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListAccountsResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListAccountsResponse)(nil) + +// ListAccountsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListAccountsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListAccountsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListAccountsResponse) UnmarshalJSON(b []byte) error { + return ListAccountsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListAccountsResponse)(nil) + +// GetAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetAccountRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetAccountRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetAccountRequest)(nil) + +// GetAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetAccountRequest) UnmarshalJSON(b []byte) error { + return GetAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetAccountRequest)(nil) + +// CreateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of CreateAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var CreateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *CreateAccountRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := CreateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*CreateAccountRequest)(nil) + +// CreateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of CreateAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var CreateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *CreateAccountRequest) UnmarshalJSON(b []byte) error { + return CreateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*CreateAccountRequest)(nil) + +// UpdateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of UpdateAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var UpdateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *UpdateAccountRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := UpdateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*UpdateAccountRequest)(nil) + +// UpdateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of UpdateAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var UpdateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *UpdateAccountRequest) UnmarshalJSON(b []byte) error { + return UpdateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*UpdateAccountRequest)(nil) + +// DeleteAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of DeleteAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var DeleteAccountRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *DeleteAccountRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := DeleteAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*DeleteAccountRequest)(nil) + +// DeleteAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of DeleteAccountRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var DeleteAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *DeleteAccountRequest) UnmarshalJSON(b []byte) error { + return DeleteAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*DeleteAccountRequest)(nil) + +// ListGroupsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListGroupsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListGroupsRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListGroupsRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListGroupsRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListGroupsRequest)(nil) + +// ListGroupsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListGroupsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListGroupsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListGroupsRequest) UnmarshalJSON(b []byte) error { + return ListGroupsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListGroupsRequest)(nil) + +// ListGroupsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListGroupsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListGroupsResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListGroupsResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListGroupsResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListGroupsResponse)(nil) + +// ListGroupsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListGroupsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListGroupsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListGroupsResponse) UnmarshalJSON(b []byte) error { + return ListGroupsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListGroupsResponse)(nil) + +// GetGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetGroupRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetGroupRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetGroupRequest)(nil) + +// GetGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetGroupRequest) UnmarshalJSON(b []byte) error { + return GetGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetGroupRequest)(nil) + +// CreateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of CreateGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var CreateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *CreateGroupRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := CreateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*CreateGroupRequest)(nil) + +// CreateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of CreateGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var CreateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *CreateGroupRequest) UnmarshalJSON(b []byte) error { + return CreateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*CreateGroupRequest)(nil) + +// UpdateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of UpdateGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var UpdateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *UpdateGroupRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := UpdateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*UpdateGroupRequest)(nil) + +// UpdateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of UpdateGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var UpdateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *UpdateGroupRequest) UnmarshalJSON(b []byte) error { + return UpdateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*UpdateGroupRequest)(nil) + +// DeleteGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of DeleteGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var DeleteGroupRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *DeleteGroupRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := DeleteGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*DeleteGroupRequest)(nil) + +// DeleteGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of DeleteGroupRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var DeleteGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *DeleteGroupRequest) UnmarshalJSON(b []byte) error { + return DeleteGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*DeleteGroupRequest)(nil) + +// AddMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of AddMemberRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddMemberRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *AddMemberRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AddMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*AddMemberRequest)(nil) + +// AddMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of AddMemberRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *AddMemberRequest) UnmarshalJSON(b []byte) error { + return AddMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*AddMemberRequest)(nil) + +// RemoveMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of RemoveMemberRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveMemberRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *RemoveMemberRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := RemoveMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*RemoveMemberRequest)(nil) + +// RemoveMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of RemoveMemberRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *RemoveMemberRequest) UnmarshalJSON(b []byte) error { + return RemoveMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*RemoveMemberRequest)(nil) + +// ListMembersRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListMembersRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListMembersRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListMembersRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListMembersRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListMembersRequest)(nil) + +// ListMembersRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListMembersRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListMembersRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListMembersRequest) UnmarshalJSON(b []byte) error { + return ListMembersRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListMembersRequest)(nil) + +// ListMembersResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListMembersResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListMembersResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListMembersResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListMembersResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListMembersResponse)(nil) + +// ListMembersResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListMembersResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListMembersResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListMembersResponse) UnmarshalJSON(b []byte) error { + return ListMembersResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListMembersResponse)(nil) diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json new file mode 100644 index 00000000000..4c78973aeba --- /dev/null +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -0,0 +1,1047 @@ +{ + "swagger": "2.0", + "info": { + "title": "ocis/services/accounts/v1/accounts.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AccountsService" + }, + { + "name": "GroupsService" + }, + { + "name": "IndexService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/api/v1/accounts/accounts-create": { + "post": { + "summary": "Creates an account\nrpc CreateAccount(CreateAccountRequest) returns (Account) {", + "operationId": "AccountsService_CreateAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateAccountRequest" + } + } + ], + "tags": [ + "AccountsService" + ] + } + }, + "/api/v1/accounts/accounts-delete": { + "post": { + "summary": "Deletes an account", + "operationId": "AccountsService_DeleteAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DeleteAccountRequest" + } + } + ], + "tags": [ + "AccountsService" + ] + } + }, + "/api/v1/accounts/accounts-get": { + "post": { + "summary": "Gets an account\nrpc GetAccount(GetAccountRequest) returns (Account) {", + "operationId": "AccountsService_GetAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetAccountRequest" + } + } + ], + "tags": [ + "AccountsService" + ] + } + }, + "/api/v1/accounts/accounts-list": { + "post": { + "summary": "Lists accounts", + "operationId": "AccountsService_ListAccounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAccountsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListAccountsRequest" + } + } + ], + "tags": [ + "AccountsService" + ] + } + }, + "/api/v1/accounts/accounts-update": { + "post": { + "summary": "Updates an account\nrpc UpdateAccount(UpdateAccountRequest) returns (Account) {", + "operationId": "AccountsService_UpdateAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateAccountRequest" + } + } + ], + "tags": [ + "AccountsService" + ] + } + }, + "/api/v1/accounts/groups-create": { + "post": { + "summary": "Creates a group", + "operationId": "GroupsService_CreateGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Group" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateGroupRequest" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/accounts/groups-delete": { + "post": { + "summary": "Deletes a group", + "operationId": "GroupsService_DeleteGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DeleteGroupRequest" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/accounts/groups-get": { + "post": { + "summary": "Gets an groups", + "operationId": "GroupsService_GetGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Group" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetGroupRequest" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/accounts/groups-list": { + "post": { + "summary": "Lists groups", + "operationId": "GroupsService_ListGroups", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListGroupsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListGroupsRequest" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/accounts/groups-update": { + "post": { + "summary": "Updates a group", + "operationId": "GroupsService_UpdateGroup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Group" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateGroupRequest" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/groups/{groupId}/members/$ref": { + "post": { + "summary": "group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0\u0026tabs=http", + "operationId": "GroupsService_AddMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Group" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "groupId", + "description": "The id of the group to add a member to", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "accountId": { + "type": "string", + "title": "The account id to add" + } + } + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/groups/{groupId}/members/{accountId}/$ref": { + "post": { + "summary": "group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0", + "operationId": "GroupsService_RemoveMember", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Group" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "groupId", + "description": "The id of the group to remove a member from", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "accountId", + "description": "The account id to remove", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/groups/{id}/members/$ref": { + "post": { + "summary": "group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0", + "operationId": "GroupsService_ListMembers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListMembersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The id of the group to list members from", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "pageToken": { + "type": "string", + "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" + }, + "fieldMask": { + "type": "string", + "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." + }, + "query": { + "type": "string", + "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", + "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" + } + } + } + } + ], + "tags": [ + "GroupsService" + ] + } + }, + "/api/v1/index/rebuild": { + "post": { + "operationId": "IndexService_RebuildIndex", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RebuildIndexResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RebuildIndexRequest" + } + } + ], + "tags": [ + "IndexService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1Account": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only." + }, + "accountEnabled": { + "type": "boolean", + "description": "*true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter." + }, + "isResourceAccount": { + "type": "boolean", + "description": "A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general.\nIn Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number.\nYou could give printers or machines with a sync client resource accounts as well.\nA resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019.\n*true* if the user is a resource account; otherwise, *false*. Null value should be considered false." + }, + "creationType": { + "type": "string", + "description": "Indicates whether the account was created as\n- a regular school or work account (\"\" / emptystring),\n- a local account, fully managed by oCIS (LocalAccount), includes synced accounts or\n- an external account (Invitation),\n- self-service sign-up using email verification (EmailVerified). Read-only." + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Identities" + }, + "description": "Represents the identities that can be used to sign in to this account.\nAn identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account.\nMay contain multiple items with the same signInType value. Supports $filter." + }, + "displayName": { + "type": "string", + "title": "The name displayed in the address book for the account.\nThis is usually the combination of the user's first name, middle initial and last name.\nThis property is required when a user is created and it cannot be cleared during updates.\nSupports $filter and $orderby.\nposixaccount MUST cn" + }, + "preferredName": { + "type": "string", + "title": "The username\nposixaccount MUST uid" + }, + "uidNumber": { + "type": "string", + "format": "int64", + "title": "TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users\nused for exposing the user using ldap\nposixaccount MUST uidnumber" + }, + "gidNumber": { + "type": "string", + "format": "int64", + "title": "used for exposing the user using ldap\nposixaccount MUST gidnumber" + }, + "mail": { + "type": "string", + "title": "The SMTP address for the user, for example, \"jeff@contoso.onmicrosoft.com\". Read-Only. Supports $filter.\ninetorgperson MAY mail" + }, + "description": { + "type": "string", + "title": "A description, useful for resource accounts\nposixaccount MAY description" + }, + "passwordProfile": { + "$ref": "#/definitions/v1PasswordProfile", + "title": "Specifies the password profile for the user.\nThe profile contains the user’s password. This property is required when a user is created.\nThe password in the profile must satisfy minimum requirements as specified by the passwordPolicies property.\nBy default, a strong password is required.\nposixaccount MAY authPassword" + }, + "memberOf": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Group" + }, + "title": "The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable.\nshould we only respond with repeated strings of ids? no clients should a proper filter mask!" + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "The created date of the account object." + }, + "deletedDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time the user was deleted. Returned only on $select." + }, + "onPremisesSyncEnabled": { + "type": "boolean", + "title": "*true* if this object is synced from an on-premises directory;\n*false* if this object was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default). Read-only" + }, + "onPremisesImmutableId": { + "type": "string", + "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." + }, + "onPremisesSecurityIdentifier": { + "type": "string", + "description": "Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only." + }, + "onPremisesDistinguishedName": { + "type": "string", + "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." + }, + "onPremisesSamAccountName": { + "type": "string", + "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." + }, + "onPremisesDomainName": { + "type": "string", + "description": "Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." + }, + "onPremisesUserPrincipalName": { + "type": "string", + "description": "Contains the on-premises userPrincipalName synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." + }, + "onPremisesLastSyncDateTime": { + "type": "string", + "format": "date-time", + "description": "Indicates the last time at which the object was synced with the on-premises directory; Read-only." + }, + "onPremisesProvisioningErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OnPremisesProvisioningError" + }, + "description": "Errors when using synchronization during provisioning." + }, + "externalUserState": { + "type": "string", + "description": "For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status.\nFor invited users, the state can be `PendingAcceptance` or `Accepted`, or \"\" / emptystring for all other users.\nReturned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'." + }, + "externalUserStateChangeDateTime": { + "type": "string", + "format": "date-time", + "description": "Shows the timestamp for the latest change to the externalUserState property. Returned only on $select." + }, + "refreshTokensValidFromDateTime": { + "type": "string", + "format": "date-time", + "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nReturned only on $select. Read-only. Use invalidateAllRefreshTokens to reset." + }, + "signInSessionsValidFromDateTime": { + "type": "string", + "format": "date-time", + "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nRead-only. Use revokeSignInSessions to reset." + } + }, + "title": "Account follows the properties of the ms graph api user resource.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties" + }, + "v1CreateAccountRequest": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/v1Account", + "title": "The account resource to create" + } + } + }, + "v1CreateGroupRequest": { + "type": "object", + "properties": { + "group": { + "$ref": "#/definitions/v1Group", + "title": "The account resource to create" + } + } + }, + "v1DeleteAccountRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1DeleteGroupRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1GetAccountRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1GetGroupRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1Group": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The unique identifier for the group.\nReturned by default. Inherited from directoryObject. Key. Not nullable. Read-only." + }, + "displayName": { + "type": "string", + "title": "The display name for the group. This property is required when a group is created and cannot be cleared during updates.\nReturned by default. Supports $filter and $orderby.\ngroupofnames MUST cn" + }, + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Account" + }, + "title": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable.\nTODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Account" + }, + "title": "groupofnames MAY businessCategory\ngroupofnames MAY o\ngroupofnames MAY ou\ngroupofnames MAY owner, SINGLE-VALUE but there might be multiple owners" + }, + "description": { + "type": "string", + "title": "An optional description for the group. Returned by default.\ngroupofnames MAY description" + }, + "gidNumber": { + "type": "string", + "format": "int64", + "title": "used for exposing the user using ldap\nposixgroup MUST gidnumber" + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created\nReturned by default. Read-only." + }, + "deletedDateTime": { + "type": "string", + "format": "date-time", + "description": "For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null.\nReturned by default. Read-only." + }, + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created.\nReturned by default. Read-only." + }, + "hideFromAddressLists": { + "type": "boolean", + "description": "True if the group is not displayed in certain parts of the Outlook user interface:\nin the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false.\nReturned only on $select." + }, + "visibility": { + "type": "string", + "description": "Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more.\nVisibility can be set only when a group is created; it is not editable.\nReturned by default." + }, + "onPremisesSyncEnabled": { + "type": "boolean", + "description": "*true* if this group is synced from an on-premises directory;\n*false* if this group was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default).\nReturned by default. Read-only. Supports $filter." + }, + "onPremisesImmutableId": { + "type": "string", + "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." + }, + "onPremisesSecurityIdentifier": { + "type": "string", + "description": "Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only." + }, + "onPremisesDistinguishedName": { + "type": "string", + "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." + }, + "onPremisesSamAccountName": { + "type": "string", + "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only." + }, + "onPremisesDomainName": { + "type": "string", + "description": "Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." + }, + "onPremisesNetBiosName": { + "type": "string", + "description": "Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." + }, + "onPremisesLastSyncDateTime": { + "type": "string", + "description": "Indicates the last time at which the group was synced with the on-premises directory.\nReturned by default. Read-only. Supports $filter." + }, + "onPremisesProvisioningErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OnPremisesProvisioningError" + }, + "description": "Errors when using synchronization during provisioning." + } + } + }, + "v1Identities": { + "type": "object", + "properties": { + "signInType": { + "type": "string", + "description": "Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`.\nHere, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer.\nAdditional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`.\nThis property can also be set to any custom string." + }, + "issuer": { + "type": "string", + "description": "Specifies the issuer of the identity, for example facebook.com.\nFor local accounts (where signInType is not federated), this property is\nthe local B2C tenant default domain name, for example contoso.onmicrosoft.com.\nFor external users from other Azure AD organization, this will be the domain of\nthe federated organization, for example contoso.com.\nSupports $filter. 512 character limit." + }, + "issuerAssignedId": { + "type": "string", + "description": "Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).\nWhen *signInType* is set to:\n* `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address\n* `userName`, issuer_assigned_id must be a valid local part of an email address\nSupports $filter. 512 character limit." + } + }, + "description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames." + }, + "v1ListAccountsRequest": { + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "format": "int32", + "title": "Optional. The maximum number of accounts to return in the response" + }, + "pageToken": { + "type": "string", + "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" + }, + "fieldMask": { + "type": "string", + "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." + }, + "query": { + "type": "string", + "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `email=foo@example.com` returns accounts with\n`email` set to `foo@example.com`\n* Query `display_name=\\\\\"Test String\\\\\"` returns accounts with\ndisplay names that include both \"Test\" and \"String\"", + "title": "Optional. Search criteria used to select the accounts to return.\nIf no search criteria is specified then all accounts will be\nreturned" + } + } + }, + "v1ListAccountsResponse": { + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Account" + }, + "title": "The field name should match the noun \"accounts\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" + }, + "nextPageToken": { + "type": "string", + "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" + } + } + }, + "v1ListGroupsRequest": { + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "format": "int32", + "title": "Optional. The maximum number of groups to return in the response" + }, + "pageToken": { + "type": "string", + "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" + }, + "fieldMask": { + "type": "string", + "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." + }, + "query": { + "type": "string", + "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", + "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" + } + } + }, + "v1ListGroupsResponse": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Group" + }, + "title": "The field name should match the noun \"group\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" + }, + "nextPageToken": { + "type": "string", + "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" + } + } + }, + "v1ListMembersResponse": { + "type": "object", + "properties": { + "members": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Account" + }, + "title": "The field name should match the noun \"members\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" + }, + "nextPageToken": { + "type": "string", + "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" + } + } + }, + "v1OnPremisesProvisioningError": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property." + }, + "occurredDateTime": { + "type": "string", + "format": "date-time", + "description": "The date and time at which the error occurred." + }, + "propertyCausingError": { + "type": "string", + "title": "Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress" + }, + "value": { + "type": "string", + "description": "Value of the property causing the error." + } + } + }, + "v1PasswordProfile": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "The password for the user. This property is required when a user is created.\nIt can be updated, but the user will be required to change the password on the next login.\nThe password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required." + }, + "lastPasswordChangeDateTime": { + "type": "string", + "format": "date-time", + "description": "The time when this account last changed their password." + }, + "passwordPolicies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specifies password policies for the user.\nThis value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified.\n“DisablePasswordExpiration” can also be specified." + }, + "forceChangePasswordNextSignIn": { + "type": "boolean", + "description": "*true* if the user must change her password on the next login; otherwise false." + }, + "forceChangePasswordNextSignInWithMfa": { + "type": "boolean", + "description": "If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false." + } + } + }, + "v1RebuildIndexRequest": { + "type": "object" + }, + "v1RebuildIndexResponse": { + "type": "object" + }, + "v1UpdateAccountRequest": { + "type": "object", + "properties": { + "account": { + "$ref": "#/definitions/v1Account", + "title": "The account resource which replaces the resource on the server" + }, + "updateMask": { + "type": "string", + "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" + } + } + }, + "v1UpdateGroupRequest": { + "type": "object", + "properties": { + "group": { + "$ref": "#/definitions/v1Group", + "title": "The group resource which replaces the resource on the server" + }, + "updateMask": { + "type": "string", + "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" + } + } + } + } +} diff --git a/protogen/proto/buf.gen.yaml b/protogen/proto/buf.gen.yaml new file mode 100644 index 00000000000..6c8f06d436f --- /dev/null +++ b/protogen/proto/buf.gen.yaml @@ -0,0 +1,29 @@ +version: v1 +plugins: + - name: go + path: ../../.bingo/protoc-gen-go + out: ../gen/ + opt: + - paths=source_relative + + - name: micro + path: ../../.bingo/protoc-gen-micro + out: ../gen/ + opt: + - paths=source_relative + + - name: microweb + path: ../../.bingo/protoc-gen-microweb + out: ../gen/ + opt: + - paths=source_relative + + - name: openapiv2 + path: ../../.bingo/protoc-gen-openapiv2 + out: ../gen/ + + - name: doc + path: ../../.bingo/protoc-gen-doc + out: ../docs/extensions + opt: + - ../docs/GRPC.tmpl,grpc.md,source_relative diff --git a/protogen/proto/buf.lock b/protogen/proto/buf.lock new file mode 100644 index 00000000000..d1ae93a8d87 --- /dev/null +++ b/protogen/proto/buf.lock @@ -0,0 +1,10 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: googleapis + repository: googleapis + branch: main + commit: 5860854adf6a48c39b19d54342b68385 + digest: b1-WayFxGJKhSLbpMCQ-VZ5-3R5Gj9iRFYsMG7o57lgqog= + create_time: 2021-12-14T15:10:38.563007Z diff --git a/protogen/proto/buf.yaml b/protogen/proto/buf.yaml new file mode 100644 index 00000000000..361675a46bf --- /dev/null +++ b/protogen/proto/buf.yaml @@ -0,0 +1,9 @@ +version: v1 +lint: + use: + - DEFAULT +deps: + - buf.build/googleapis/googleapis +breaking: + use: + - FILE diff --git a/protogen/proto/ocis/messages/accounts/v1/accounts.proto b/protogen/proto/ocis/messages/accounts/v1/accounts.proto new file mode 100644 index 00000000000..106b19a6a54 --- /dev/null +++ b/protogen/proto/ocis/messages/accounts/v1/accounts.proto @@ -0,0 +1,329 @@ +syntax = "proto3"; + +package ocis.messages.accounts.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1"; + +import "google/protobuf/timestamp.proto"; +// Account follows the properties of the ms graph api user resource. +// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties +message Account { + + // Note that field numbers in the range 1 through 15 take one byte to encode, including the field number and the field's type + + // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. + string id = 1; + + // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. + bool account_enabled = 2; + + // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. + // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. + // You could give printers or machines with a sync client resource accounts as well. + // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. + // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. + bool is_resource_account = 3; + + // Indicates whether the account was created as + // - a regular school or work account ("" / emptystring), + // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or + // - an external account (Invitation), + // - self-service sign-up using email verification (EmailVerified). Read-only. + string creation_type = 4; + + // Represents the identities that can be used to sign in to this account. + // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. + // May contain multiple items with the same signInType value. Supports $filter. + repeated Identities identities = 5; + + // posixaccount properties + + // The name displayed in the address book for the account. + // This is usually the combination of the user's first name, middle initial and last name. + // This property is required when a user is created and it cannot be cleared during updates. + // Supports $filter and $orderby. + // posixaccount MUST cn + string display_name = 6; + + // The username + // posixaccount MUST uid + string preferred_name = 7; + + // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users + // used for exposing the user using ldap + // posixaccount MUST uidnumber + int64 uid_number = 8; + + // used for exposing the user using ldap + // posixaccount MUST gidnumber + int64 gid_number = 9; + + // posixaccount MUST homedirectory + // constructed dynamically in glauth + + // posixaccount MAY loginshell + // posixaccount MAY gecos + + // For the GECOS field: + // - User's full name (or application name, if the account is for a program) -> displayname (description) + // - Building and room number or contact person -> - + // - Office telephone number -> - + // - Any other contact information (pager number, fax, etc.) -> mail + // eg "Albert Einstein (Beware! I'm doing science!),,,einstein@example.com" as the gecos + + // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. + // inetorgperson MAY mail + string mail = 10; + + // A description, useful for resource accounts + // posixaccount MAY description + string description = 11; + + // Specifies the password profile for the user. + // The profile contains the user’s password. This property is required when a user is created. + // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. + // By default, a strong password is required. + // posixaccount MAY authPassword + PasswordProfile password_profile = 12; + + // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. + // should we only respond with repeated strings of ids? no clients should a proper filter mask! + repeated Group memberOf = 13; + + // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. + + // The created date of the account object. + google.protobuf.Timestamp created_date_time = 16; + + // The date and time the user was deleted. Returned only on $select. + google.protobuf.Timestamp deleted_date_time = 17; + + // properties for sync + + // *true* if this object is synced from an on-premises directory; + // *false* if this object was originally synced from an on-premises directory but is no longer synced; + // null if this object has never been synced from an on-premises directory (default). Read-only + bool on_premises_sync_enabled = 20; + + // This property is used to associate an on-premises LDAP user to the oCIS account object. + // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. + // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. + string on_premises_immutable_id = 21; + + // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. + string on_premises_security_identifier = 22; + + // Contains the on-premises LDAP `distinguished name` or `DN`. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + string on_premises_distinguished_name = 23; + + // Contains the on-premises `samAccountName` synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + string on_premises_sam_account_name = 24; + + // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + string on_premises_domain_name = 25; + + // Contains the on-premises userPrincipalName synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + string on_premises_user_principal_name = 26; + + // Contains extensionAttributes 1-15 for the user. Note that the individual extension attributes are neither selectable nor filterable. + // For an onPremisesSyncEnabled user, this set of properties is mastered on-premises and is read-only. + // For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update. + //onPremisesExtensionAttributes onPremisesExtensionAttributes = 27 + + // Indicates the last time at which the object was synced with the on-premises directory; Read-only. + google.protobuf.Timestamp on_premises_last_sync_date_time = 28; + + // Errors when using synchronization during provisioning. + repeated OnPremisesProvisioningError on_premises_provisioning_errors = 29; + + // TODO do we need to sync uidnumber and gidnumber from the external ldap? we may assign different numbers so eos has a non colliding namespace. + // we can sync them to the (uid|gid)_number fields but what if they changed in the external ldap and now collide? + // move those properties to a posixaccount message so we can exchange that part with an external (readonly or writeable) ldap server? + + // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. + // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. + // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. + string external_user_state = 40; + + // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. + google.protobuf.Timestamp external_user_state_change_date_time = 41; + + // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get + // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). + // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. + // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. + google.protobuf.Timestamp refresh_tokens_valid_from_date_time = 60; + + // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get + // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). + // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. + // Read-only. Use revokeSignInSessions to reset. + google.protobuf.Timestamp sign_in_sessions_valid_from_date_time = 61; +} + +// Identities Represents an identity used to sign in to a user account. +// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. +// This enables the user to sign in to the user account with any of those associated identities. +// They are also used to keep a history of old usernames. +message Identities { + // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. + // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. + // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. + // This property can also be set to any custom string. + string sign_in_type = 1; + + // Specifies the issuer of the identity, for example facebook.com. + // For local accounts (where signInType is not federated), this property is + // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. + // For external users from other Azure AD organization, this will be the domain of + // the federated organization, for example contoso.com. + // Supports $filter. 512 character limit. + string issuer = 2; + + // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). + // When *signInType* is set to: + // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address + // * `userName`, issuer_assigned_id must be a valid local part of an email address + // Supports $filter. 512 character limit. + string issuer_assigned_id = 3; +} +message PasswordProfile { + // The password for the user. This property is required when a user is created. + // It can be updated, but the user will be required to change the password on the next login. + // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. + string password = 1; + + // The time when this account last changed their password. + google.protobuf.Timestamp last_password_change_date_time = 2; + + // Specifies password policies for the user. + //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. + // “DisablePasswordExpiration” can also be specified. + repeated string password_policies = 3; + + // *true* if the user must change her password on the next login; otherwise false. + bool force_change_password_next_sign_in = 4; + + // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + bool force_change_password_next_sign_in_with_mfa = 5; +} + +message Group { + + // The unique identifier for the group. + // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. + string id = 1; + + // groupofnames + + // The display name for the group. This property is required when a group is created and cannot be cleared during updates. + // Returned by default. Supports $filter and $orderby. + // groupofnames MUST cn + string display_name = 2; + // groupofnames MUST/MAY member + + // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. + // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later + repeated Account members = 3; + + // groupofnames MAY businessCategory + // groupofnames MAY o + // groupofnames MAY ou + // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners + repeated Account owners = 4; + + // An optional description for the group. Returned by default. + // groupofnames MAY description + string description = 5; + + // groupofnames MAY seeAlso + + // posixgroup + + // used for exposing the user using ldap + // posixgroup MUST gidnumber + int64 gid_number = 6; + // posixgroup MAY authPassword + // posixgroup MAY userPassword + // posixgroup MAY memberUid -> groupofnames member + // posixgroup MAY description -> groupofnames + + + // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created + // Returned by default. Read-only. + google.protobuf.Timestamp created_date_time = 7; + + // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. + // Returned by default. Read-only. + google.protobuf.Timestamp deleted_date_time = 8; + + // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. + // Returned by default. Read-only. + google.protobuf.Timestamp expiration_date_time = 9; + + // True if the group is not displayed in certain parts of the Outlook user interface: + // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. + // Returned only on $select. + bool hide_from_address_lists = 10; + + // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. + // Visibility can be set only when a group is created; it is not editable. + // Returned by default. + string visibility = 11; + + // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. + + // properties for sync + + // *true* if this group is synced from an on-premises directory; + // *false* if this group was originally synced from an on-premises directory but is no longer synced; + // null if this object has never been synced from an on-premises directory (default). + // Returned by default. Read-only. Supports $filter. + bool on_premises_sync_enabled = 20; + + // This property is used to associate an on-premises LDAP user to the oCIS account object. + // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. + // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. + string on_premises_immutable_id = 21; + + // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. + string on_premises_security_identifier = 22; + + // Contains the on-premises LDAP `distinguished name` or `DN`. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. + string on_premises_distinguished_name = 23; + + // Contains the on-premises `samAccountName` synchronized from the on-premises directory. + // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. + string on_premises_sam_account_name = 24; + + // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. + // Returned by default. Read-only. + string on_premises_domain_name = 25; + + // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. + // Returned by default. Read-only. + string on_premises_net_bios_name = 26; + + // Indicates the last time at which the group was synced with the on-premises directory. + // Returned by default. Read-only. Supports $filter. + string on_premises_last_sync_date_time = 27; + + // Errors when using synchronization during provisioning. + repeated OnPremisesProvisioningError on_premises_provisioning_errors = 28; +} + +message OnPremisesProvisioningError { + // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. + string category = 1; + // The date and time at which the error occurred. + google.protobuf.Timestamp occurred_date_time = 2; + // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress + string property_causing_error = 3; + // Value of the property causing the error. + string value = 4; +} diff --git a/protogen/proto/ocis/services/accounts/v1/accounts.proto b/protogen/proto/ocis/services/accounts/v1/accounts.proto new file mode 100644 index 00000000000..471f35a1e98 --- /dev/null +++ b/protogen/proto/ocis/services/accounts/v1/accounts.proto @@ -0,0 +1,350 @@ +syntax = "proto3"; + +package ocis.services.accounts.v1; + +option go_package = "github.com/jvillafanez/prototest001/gen/ocis/services/accounts/v1"; + +import "ocis/messages/accounts/v1/accounts.proto"; +import "google/api/field_behavior.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +// Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods +// https://cloud.google.com/apis/design/standard_methods?hl=de#list +// https://cloud.google.com/apis/design/naming_convention?hl=de +service AccountsService { + // Lists accounts + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { + // List method maps to HTTP GET + option (google.api.http) = { + post: "/api/v1/accounts/accounts-list", + body: "*" + }; + } + // Gets an account + //rpc GetAccount(GetAccountRequest) returns (Account) { + rpc GetAccount(GetAccountRequest) returns (ocis.messages.accounts.v1.Account) { + option (google.api.http) = { + post: "/api/v1/accounts/accounts-get", + body: "*" + }; + } + // Creates an account + //rpc CreateAccount(CreateAccountRequest) returns (Account) { + rpc CreateAccount(CreateAccountRequest) returns (ocis.messages.accounts.v1.Account) { + // Create maps to HTTP POST. URL path as the collection name. + // HTTP request body contains the resource + option (google.api.http) = { + post: "/api/v1/accounts/accounts-create" + body: "*" + }; + } + // Updates an account + //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + rpc UpdateAccount(UpdateAccountRequest) returns (ocis.messages.accounts.v1.Account) { + // Update maps to HTTP PATCH. Resource name is mapped to a URL path. + // Resource is contained in the HTTP request body + option (google.api.http) = { + post: "/api/v1/accounts/accounts-update" + body: "*" + }; + }; + // Deletes an account + rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { + // Delete maps to HTTP DELETE. Resource name maps to the URL path. + // There is no request body + option (google.api.http) = { + post: "/api/v1/accounts/accounts-delete", + body: "*" + }; + } +} + +service GroupsService { + // Lists groups + rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { + // List method maps to HTTP GET + option (google.api.http) = { + post: "/api/v1/accounts/groups-list", + body: "*" + }; + } + // Gets an groups + rpc GetGroup(GetGroupRequest) returns (ocis.messages.accounts.v1.Group) { + option (google.api.http) = { + post: "/api/v1/accounts/groups-get", + body: "*" + }; + } + // Creates a group + rpc CreateGroup(CreateGroupRequest) returns (ocis.messages.accounts.v1.Group) { + // Create maps to HTTP POST. URL path as the collection name. + // HTTP request body contains the resource + option (google.api.http) = { + post: "/api/v1/accounts/groups-create" + body: "*" + }; + } + // Updates a group + rpc UpdateGroup(UpdateGroupRequest) returns (ocis.messages.accounts.v1.Group) { + // Update maps to HTTP PATCH. Resource name is mapped to a URL path. + // Resource is contained in the HTTP request body + option (google.api.http) = { + post: "/api/v1/accounts/groups-update" + body: "*" + }; + }; + // Deletes a group + rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { + // Delete maps to HTTP DELETE. Resource name maps to the URL path. + // There is no request body + option (google.api.http) = { + post: "/api/v1/accounts/groups-delete", + body: "*" + }; + } + + // additional group methods: https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#methods + + // references are accessed using $ref, see http://docs.oasis-open.org/odata/odata/v4.0/cs01/part2-url-conventions/odata-v4.0-cs01-part2-url-conventions.html#_Toc365046422 + // or the stack overflow question https://stackoverflow.com/questions/49362894/why-is-the-microsoft-graph-api-using-ref-in-the-uri + + // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http + rpc AddMember(AddMemberRequest) returns (ocis.messages.accounts.v1.Group) { + // All request parameters go into body. + option (google.api.http) = { + post: "/api/v1/groups/{group_id=*}/members/$ref" + body: "*" + }; + } + // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 + rpc RemoveMember(RemoveMemberRequest) returns (ocis.messages.accounts.v1.Group) { + // All request parameters go into body. + option (google.api.http) = { + // URLs are broken + post: "/api/v1/groups/{group_id=*}/members/{account_id}/$ref" + body: "*" + }; + } + // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 + rpc ListMembers(ListMembersRequest) returns (ListMembersResponse) { + // All request parameters go into body. + option (google.api.http) = { + // URLs are broken + post: "/api/v1/groups/{id=*}/members/$ref" + body: "*" + }; + } + +} + +service IndexService { + rpc RebuildIndex(RebuildIndexRequest) returns (RebuildIndexResponse) { + // All request parameters go into body. + option (google.api.http) = { + // URLs are broken + post: "/api/v1/index/rebuild" + body: "*" + }; + } +} + +message RebuildIndexRequest { +} + +message RebuildIndexResponse { +} + +message ListAccountsRequest { + // Optional. The maximum number of accounts to return in the response + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + google.protobuf.FieldMask field_mask = 3; + + // Optional. Search criteria used to select the accounts to return. + // If no search criteria is specified then all accounts will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `email=foo@example.com` returns accounts with + // `email` set to `foo@example.com` + // * Query `display_name=\\"Test String\\"` returns accounts with + // display names that include both "Test" and "String" + string query = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message ListAccountsResponse { + // The field name should match the noun "accounts" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + repeated ocis.messages.accounts.v1.Account accounts = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + string next_page_token = 2; +} + +message GetAccountRequest { + string id = 1; +} + +message CreateAccountRequest { + // The account resource to create + ocis.messages.accounts.v1.Account account = 1; +} + +message UpdateAccountRequest { + // The account resource which replaces the resource on the server + ocis.messages.accounts.v1.Account account = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; + } + +message DeleteAccountRequest { + string id = 1; +} + +message ListGroupsRequest { + // Optional. The maximum number of groups to return in the response + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + google.protobuf.FieldMask field_mask = 3; + + // Optional. Search criteria used to select the groups to return. + // If no search criteria is specified then all groups will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `display_name=\\"Test String\\"` returns groups with + // display names that include both "Test" and "String" + string query = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +message ListGroupsResponse { + // The field name should match the noun "group" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + repeated ocis.messages.accounts.v1.Group groups = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + string next_page_token = 2; +} + +message GetGroupRequest { + string id = 1; +} + +message CreateGroupRequest { + // The account resource to create + ocis.messages.accounts.v1.Group group = 1; +} + +message UpdateGroupRequest { + // The group resource which replaces the resource on the server + ocis.messages.accounts.v1.Group group = 1; + + // The update mask applies to the resource. For the `FieldMask` definition, + // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + google.protobuf.FieldMask update_mask = 2; + } + +message DeleteGroupRequest { + string id = 1; +} + +message AddMemberRequest { + // The id of the group to add a member to + string group_id = 1; + // The account id to add + string account_id = 2; +} + +message RemoveMemberRequest { + // The id of the group to remove a member from + string group_id = 1; + // The account id to remove + string account_id = 2; +} + +message ListMembersRequest { + int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A pagination token returned from a previous call to `Get` + // that indicates from where search should continue + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Used to specify a subset of fields that should be + // returned by a get operation or modified by an update operation. + google.protobuf.FieldMask field_mask = 3; + + // Optional. Search criteria used to select the groups to return. + // If no search criteria is specified then all groups will be + // returned + // + // TODO update query language + // Query expressions can be used to restrict results based upon + // the account properties where the operators `=`, `NOT`, `AND` and `OR` + // can be used along with the suffix wildcard symbol `*`. + // + // The string properties in a query expression should use escaped quotes + // for values that include whitespace to prevent unexpected behavior. + // + // Some example queries are: + // + // * Query `display_name=Th*` returns accounts whose display_name + // starts with "Th" + // * Query `display_name=\\"Test String\\"` returns groups with + // display names that include both "Test" and "String" + string query = 4 [(google.api.field_behavior) = OPTIONAL]; + + // The id of the group to list members from + string id = 5; +} + +message ListMembersResponse { + // The field name should match the noun "members" in the method name. There + // will be a maximum number of items returned based on the page_size field + // in the request + repeated ocis.messages.accounts.v1.Account members = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list + string next_page_token = 2; +} From 6c67ff765e393ef8d01a6136f9c2feef781dc23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 15 Dec 2021 19:06:10 +0100 Subject: [PATCH 02/20] Adjust import paths and service urls in index.js --- accounts/pkg/command/add_account.go | 12 ++- accounts/pkg/command/inspect_account.go | 10 +- accounts/pkg/command/list_accounts.go | 10 +- accounts/pkg/command/rebuild_index.go | 7 +- accounts/pkg/command/remove_account.go | 7 +- accounts/pkg/command/update_account.go | 12 ++- accounts/pkg/flagset/flagset.go | 11 +- accounts/pkg/server/grpc/server.go | 9 +- accounts/pkg/server/http/server.go | 7 +- accounts/pkg/service/v0/accounts.go | 70 ++++++------ .../service/v0/accounts_permission_test.go | 22 ++-- accounts/pkg/service/v0/groups.go | 62 +++++------ accounts/pkg/service/v0/index.go | 28 ++--- accounts/pkg/service/v0/service.go | 56 +++++----- accounts/pkg/storage/cs3.go | 22 ++-- accounts/pkg/storage/cs3_test.go | 10 +- accounts/pkg/storage/disk.go | 31 +++--- accounts/pkg/storage/repo.go | 14 +-- accounts/ui/client/accounts/index.js | 100 +++++++++--------- glauth/pkg/command/server.go | 9 +- glauth/pkg/server/glauth/ocis.go | 18 ++-- glauth/pkg/server/glauth/option.go | 11 +- ocs/pkg/service/v0/groups.go | 34 +++--- ocs/pkg/service/v0/service.go | 11 +- ocs/pkg/service/v0/users.go | 54 +++++----- proxy/pkg/command/server.go | 5 +- proxy/pkg/config/defaultconfig.go | 2 +- proxy/pkg/middleware/options.go | 7 +- proxy/pkg/proxy/policy/selector.go | 9 +- proxy/pkg/user/backend/accounts.go | 22 ++-- 30 files changed, 359 insertions(+), 323 deletions(-) diff --git a/accounts/pkg/command/add_account.go b/accounts/pkg/command/add_account.go index 1e904c5b80b..0b4118c49a8 100644 --- a/accounts/pkg/command/add_account.go +++ b/accounts/pkg/command/add_account.go @@ -3,17 +3,19 @@ package command import ( "fmt" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/accounts/pkg/flagset" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" ) // AddAccount command creates a new account func AddAccount(cfg *config.Config) *cli.Command { - a := &accounts.Account{ - PasswordProfile: &accounts.PasswordProfile{}, + a := &accountsmsg.Account{ + PasswordProfile: &accountsmsg.PasswordProfile{}, } return &cli.Command{ Name: "add", @@ -43,8 +45,8 @@ func AddAccount(cfg *config.Config) *cli.Command { }, Action: func(c *cli.Context) error { accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name - accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient()) - _, err := accSvc.CreateAccount(c.Context, &accounts.CreateAccountRequest{ + accSvc := accountssvc.NewAccountsService(accSvcID, grpc.NewClient()) + _, err := accSvc.CreateAccount(c.Context, &accountssvc.CreateAccountRequest{ Account: a, }) diff --git a/accounts/pkg/command/inspect_account.go b/accounts/pkg/command/inspect_account.go index 5e2009497ec..1578c6f6609 100644 --- a/accounts/pkg/command/inspect_account.go +++ b/accounts/pkg/command/inspect_account.go @@ -5,12 +5,14 @@ import ( "os" "strconv" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/flagset" "github.com/asim/go-micro/plugins/client/grpc/v4" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/accounts/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" ) @@ -30,8 +32,8 @@ func InspectAccount(cfg *config.Config) *cli.Command { } uid := c.Args().First() - accSvc := accounts.NewAccountsService(accServiceID, grpc.NewClient()) - acc, err := accSvc.GetAccount(c.Context, &accounts.GetAccountRequest{ + accSvc := accountssvc.NewAccountsService(accServiceID, grpc.NewClient()) + acc, err := accSvc.GetAccount(c.Context, &accountssvc.GetAccountRequest{ Id: uid, }) @@ -45,7 +47,7 @@ func InspectAccount(cfg *config.Config) *cli.Command { }} } -func buildAccountInspectTable(acc *accounts.Account) *tw.Table { +func buildAccountInspectTable(acc *accountsmsg.Account) *tw.Table { table := tw.NewWriter(os.Stdout) table.SetAutoMergeCells(true) table.AppendBulk([][]string{ diff --git a/accounts/pkg/command/list_accounts.go b/accounts/pkg/command/list_accounts.go index 3c15a127516..7eff3a4a038 100644 --- a/accounts/pkg/command/list_accounts.go +++ b/accounts/pkg/command/list_accounts.go @@ -5,12 +5,14 @@ import ( "os" "strconv" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/flagset" "github.com/asim/go-micro/plugins/client/grpc/v4" tw "github.com/olekukonko/tablewriter" "github.com/owncloud/ocis/accounts/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" ) @@ -24,8 +26,8 @@ func ListAccounts(cfg *config.Config) *cli.Command { Flags: flagset.ListAccountsWithConfig(cfg), Action: func(c *cli.Context) error { accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name - accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient()) - resp, err := accSvc.ListAccounts(c.Context, &accounts.ListAccountsRequest{}) + accSvc := accountssvc.NewAccountsService(accSvcID, grpc.NewClient()) + resp, err := accSvc.ListAccounts(c.Context, &accountssvc.ListAccountsRequest{}) if err != nil { fmt.Println(fmt.Errorf("could not list accounts %w", err)) @@ -38,7 +40,7 @@ func ListAccounts(cfg *config.Config) *cli.Command { } // buildAccountsListTable creates an ascii table for printing on the cli -func buildAccountsListTable(accs []*accounts.Account) *tw.Table { +func buildAccountsListTable(accs []*accountsmsg.Account) *tw.Table { table := tw.NewWriter(os.Stdout) table.SetHeader([]string{"Id", "DisplayName", "Mail", "AccountEnabled"}) table.SetAutoFormatHeaders(false) diff --git a/accounts/pkg/command/rebuild_index.go b/accounts/pkg/command/rebuild_index.go index d2eb1d2de7f..3ff43f11761 100644 --- a/accounts/pkg/command/rebuild_index.go +++ b/accounts/pkg/command/rebuild_index.go @@ -4,9 +4,10 @@ import ( "context" "fmt" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" - index "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" merrors "go-micro.dev/v4/errors" ) @@ -20,9 +21,9 @@ func RebuildIndex(cdf *config.Config) *cli.Command { Aliases: []string{"rebuild", "ri"}, Action: func(ctx *cli.Context) error { idxSvcID := "com.owncloud.api.accounts" - idxSvc := index.NewIndexService(idxSvcID, grpc.NewClient()) + idxSvc := accountssvc.NewIndexService(idxSvcID, grpc.NewClient()) - _, err := idxSvc.RebuildIndex(context.Background(), &index.RebuildIndexRequest{}) + _, err := idxSvc.RebuildIndex(context.Background(), &accountssvc.RebuildIndexRequest{}) if err != nil { fmt.Println(merrors.FromError(err).Detail) return err diff --git a/accounts/pkg/command/remove_account.go b/accounts/pkg/command/remove_account.go index ee18eede46a..ce54cd87a2e 100644 --- a/accounts/pkg/command/remove_account.go +++ b/accounts/pkg/command/remove_account.go @@ -4,11 +4,12 @@ import ( "fmt" "os" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/flagset" "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" ) @@ -29,8 +30,8 @@ func RemoveAccount(cfg *config.Config) *cli.Command { } uid := c.Args().First() - accSvc := accounts.NewAccountsService(accServiceID, grpc.NewClient()) - _, err := accSvc.DeleteAccount(c.Context, &accounts.DeleteAccountRequest{Id: uid}) + accSvc := accountssvc.NewAccountsService(accServiceID, grpc.NewClient()) + _, err := accSvc.DeleteAccount(c.Context, &accountssvc.DeleteAccountRequest{Id: uid}) if err != nil { fmt.Println(fmt.Errorf("could not delete account %w", err)) diff --git a/accounts/pkg/command/update_account.go b/accounts/pkg/command/update_account.go index cf2e68950f9..91dfacd8115 100644 --- a/accounts/pkg/command/update_account.go +++ b/accounts/pkg/command/update_account.go @@ -4,19 +4,21 @@ import ( "errors" "fmt" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/flagset" "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/urfave/cli/v2" "google.golang.org/genproto/protobuf/field_mask" ) // UpdateAccount command for modifying accounts including password policies func UpdateAccount(cfg *config.Config) *cli.Command { - a := &accounts.Account{ - PasswordProfile: &accounts.PasswordProfile{}, + a := &accountsmsg.Account{ + PasswordProfile: &accountsmsg.PasswordProfile{}, } return &cli.Command{ Name: "update", @@ -42,8 +44,8 @@ func UpdateAccount(cfg *config.Config) *cli.Command { Action: func(c *cli.Context) error { a.Id = c.Args().First() accSvcID := cfg.GRPC.Namespace + "." + cfg.Service.Name - accSvc := accounts.NewAccountsService(accSvcID, grpc.NewClient()) - _, err := accSvc.UpdateAccount(c.Context, &accounts.UpdateAccountRequest{ + accSvc := accountssvc.NewAccountsService(accSvcID, grpc.NewClient()) + _, err := accSvc.UpdateAccount(c.Context, &accountssvc.UpdateAccountRequest{ Account: a, UpdateMask: buildAccUpdateMask(c.FlagNames()), }) diff --git a/accounts/pkg/flagset/flagset.go b/accounts/pkg/flagset/flagset.go index d661508e2d1..c0d5512144a 100644 --- a/accounts/pkg/flagset/flagset.go +++ b/accounts/pkg/flagset/flagset.go @@ -1,16 +1,17 @@ package flagset import ( + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/flags" "github.com/urfave/cli/v2" ) // UpdateAccountWithConfig applies update command flags to cfg -func UpdateAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag { +func UpdateAccountWithConfig(cfg *config.Config, a *accountsmsg.Account) []cli.Flag { if a.PasswordProfile == nil { - a.PasswordProfile = &accounts.PasswordProfile{} + a.PasswordProfile = &accountsmsg.PasswordProfile{} } return []cli.Flag{ @@ -92,9 +93,9 @@ func UpdateAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag } // AddAccountWithConfig applies create command flags to cfg -func AddAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag { +func AddAccountWithConfig(cfg *config.Config, a *accountsmsg.Account) []cli.Flag { if a.PasswordProfile == nil { - a.PasswordProfile = &accounts.PasswordProfile{} + a.PasswordProfile = &accountsmsg.PasswordProfile{} } return []cli.Flag{ diff --git a/accounts/pkg/server/grpc/server.go b/accounts/pkg/server/grpc/server.go index 8670c5a5ca1..4e98b0e7800 100644 --- a/accounts/pkg/server/grpc/server.go +++ b/accounts/pkg/server/grpc/server.go @@ -1,7 +1,8 @@ package grpc import ( - "github.com/owncloud/ocis/accounts/pkg/proto/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" ) @@ -21,13 +22,13 @@ func Server(opts ...Option) grpc.Service { grpc.Version(version.String), ) - if err := proto.RegisterAccountsServiceHandler(service.Server(), handler); err != nil { + if err := accountssvc.RegisterAccountsServiceHandler(service.Server(), handler); err != nil { options.Logger.Fatal().Err(err).Msg("could not register service handler") } - if err := proto.RegisterGroupsServiceHandler(service.Server(), handler); err != nil { + if err := accountssvc.RegisterGroupsServiceHandler(service.Server(), handler); err != nil { options.Logger.Fatal().Err(err).Msg("could not register groups handler") } - if err := proto.RegisterIndexServiceHandler(service.Server(), handler); err != nil { + if err := accountssvc.RegisterIndexServiceHandler(service.Server(), handler); err != nil { options.Logger.Fatal().Err(err).Msg("could not register index handler") } diff --git a/accounts/pkg/server/http/server.go b/accounts/pkg/server/http/server.go index 4fb764fcba1..9af431ef205 100644 --- a/accounts/pkg/server/http/server.go +++ b/accounts/pkg/server/http/server.go @@ -1,10 +1,11 @@ package http import ( + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/go-chi/chi/v5" chimiddleware "github.com/go-chi/chi/v5/middleware" "github.com/owncloud/ocis/accounts/pkg/assets" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/account" "github.com/owncloud/ocis/ocis-pkg/cors" "github.com/owncloud/ocis/ocis-pkg/middleware" @@ -66,8 +67,8 @@ func Server(opts ...Option) http.Service { )) mux.Route(options.Config.HTTP.Root, func(r chi.Router) { - proto.RegisterAccountsServiceWeb(r, handler) - proto.RegisterGroupsServiceWeb(r, handler) + accountssvc.RegisterAccountsServiceWeb(r, handler) + accountssvc.RegisterGroupsServiceWeb(r, handler) }) err := micro.RegisterHandler(service.Server(), mux) diff --git a/accounts/pkg/service/v0/accounts.go b/accounts/pkg/service/v0/accounts.go index d7425dce370..21bcb7e0cfd 100644 --- a/accounts/pkg/service/v0/accounts.go +++ b/accounts/pkg/service/v0/accounts.go @@ -16,10 +16,12 @@ import ( "go.opentelemetry.io/otel/attribute" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" fieldmask_utils "github.com/mennanov/fieldmask-utils" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/accounts/pkg/storage" accTracing "github.com/owncloud/ocis/accounts/pkg/tracing" "github.com/owncloud/ocis/ocis-pkg/log" @@ -47,13 +49,13 @@ const passwordValidCacheExpiration = 10 * time.Minute // login eq \"teddy\" and password eq \"F&1!b90t111!\" var authQuery = regexp.MustCompile(`^login eq '(.*)' and password eq '(.*)'$`) // TODO how is ' escaped in the password? -func (s Service) expandMemberOf(a *proto.Account) { +func (s Service) expandMemberOf(a *accountsmsg.Account) { if a == nil { return } - expanded := []*proto.Group{} + expanded := []*accountsmsg.Group{} for i := range a.MemberOf { - g := &proto.Group{} + g := &accountsmsg.Group{} // TODO resolve by name, when a create or update is issued they may not have an id? fall back to searching the group id in the index? if err := s.repo.LoadGroup(context.Background(), a.MemberOf[i].Id, g); err == nil { g.Members = nil // always hide members when expanding @@ -112,8 +114,8 @@ func (s Service) serviceUserToIndex() (teardownServiceUser func()) { return func() {} } -func (s Service) getInMemoryServiceUser() proto.Account { - return proto.Account{ +func (s Service) getInMemoryServiceUser() accountsmsg.Account { + return accountsmsg.Account{ AccountEnabled: true, Id: s.Config.ServiceUser.UUID, PreferredName: s.Config.ServiceUser.Username, @@ -126,7 +128,7 @@ func (s Service) getInMemoryServiceUser() proto.Account { // ListAccounts implements the AccountsServiceHandler interface // the query contains account properties -func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest, out *proto.ListAccountsResponse) (err error) { +func (s Service) ListAccounts(ctx context.Context, in *accountssvc.ListAccountsRequest, out *accountssvc.ListAccountsResponse) (err error) { var span trace.Span ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.ListAccounts") defer span.End() @@ -152,18 +154,18 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest return merrors.Unauthorized(s.id, "account not found or invalid credentials") } - ids, err := s.index.FindBy(&proto.Account{}, "OnPremisesSamAccountName", match[1]) + ids, err := s.index.FindBy(&accountsmsg.Account{}, "OnPremisesSamAccountName", match[1]) if err != nil || len(ids) > 1 { return merrors.Unauthorized(s.id, "account not found or invalid credentials") } if len(ids) == 0 { - ids, err = s.index.FindBy(&proto.Account{}, "Mail", match[1]) + ids, err = s.index.FindBy(&accountsmsg.Account{}, "Mail", match[1]) if err != nil || len(ids) != 1 { return merrors.Unauthorized(s.id, "account not found or invalid credentials") } } - a := &proto.Account{} + a := &accountsmsg.Account{} err = s.repo.LoadAccount(ctx, ids[0], a) if err != nil || a.PasswordProfile == nil || len(a.PasswordProfile.Password) == 0 { return merrors.Unauthorized(s.id, "account not found or invalid credentials") @@ -211,7 +213,7 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest } a.PasswordProfile.Password = "" - out.Accounts = []*proto.Account{a} + out.Accounts = []*accountsmsg.Account{a} return nil } @@ -246,10 +248,10 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest } searchResults, err := s.findAccountsByQuery(ctx, in.Query) - out.Accounts = make([]*proto.Account, 0, len(searchResults)) + out.Accounts = make([]*accountsmsg.Account, 0, len(searchResults)) for _, hit := range searchResults { - a := &proto.Account{} + a := &accountsmsg.Account{} if hit == s.Config.ServiceUser.UUID { acc := s.getInMemoryServiceUser() a = &acc @@ -276,11 +278,11 @@ func (s Service) ListAccounts(ctx context.Context, in *proto.ListAccountsRequest } func (s Service) findAccountsByQuery(ctx context.Context, query string) ([]string, error) { - return s.index.Query(ctx, &proto.Account{}, query) + return s.index.Query(ctx, &accountsmsg.Account{}, query) } // GetAccount implements the AccountsServiceHandler interface -func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, out *proto.Account) (err error) { +func (s Service) GetAccount(ctx context.Context, in *accountssvc.GetAccountRequest, out *accountsmsg.Account) (err error) { var span trace.Span ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.GetAccount") @@ -337,7 +339,7 @@ func (s Service) GetAccount(ctx context.Context, in *proto.GetAccountRequest, ou } // CreateAccount implements the AccountsServiceHandler interface -func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountRequest, out *proto.Account) (err error) { +func (s Service) CreateAccount(ctx context.Context, in *accountssvc.CreateAccountRequest, out *accountsmsg.Account) (err error) { var span trace.Span ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.CreateAccount") @@ -428,8 +430,8 @@ func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountReque out.GidNumber = userDefaultGID } - r := proto.ListGroupsResponse{} - err = s.ListGroups(ctx, &proto.ListGroupsRequest{}, &r) + r := accountssvc.ListGroupsResponse{} + err = s.ListGroups(ctx, &accountssvc.ListGroupsRequest{}, &r) if err != nil { // rollback account creation return err @@ -464,7 +466,7 @@ func (s Service) CreateAccount(ctx context.Context, in *proto.CreateAccountReque } // rollbackCreateAccount tries to rollback changes made by `CreateAccount` if parts of it failed. -func (s Service) rollbackCreateAccount(ctx context.Context, acc *proto.Account) { +func (s Service) rollbackCreateAccount(ctx context.Context, acc *accountsmsg.Account) { err := s.index.Delete(acc) if err != nil { s.log.Err(err).Msg("failed to rollback account from indices") @@ -478,7 +480,7 @@ func (s Service) rollbackCreateAccount(ctx context.Context, acc *proto.Account) // UpdateAccount implements the AccountsServiceHandler interface // read only fields are ignored // TODO how can we unset specific values? using the update mask -func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountRequest, out *proto.Account) (err error) { +func (s Service) UpdateAccount(ctx context.Context, in *accountssvc.UpdateAccountRequest, out *accountsmsg.Account) (err error) { var span trace.Span ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.UpdateAccount") @@ -568,7 +570,7 @@ func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountReque if in.Account.PasswordProfile != nil { if out.PasswordProfile == nil { - out.PasswordProfile = &proto.PasswordProfile{} + out.PasswordProfile = &accountsmsg.PasswordProfile{} } if in.Account.PasswordProfile.Password != "" { // encrypt password @@ -601,7 +603,7 @@ func (s Service) UpdateAccount(ctx context.Context, in *proto.UpdateAccountReque } // We need to reload the old account state to be able to compute the update - old := &proto.Account{} + old := &accountsmsg.Account{} if err = s.repo.LoadAccount(ctx, id, old); err != nil { s.log.Error().Err(err).Str("id", out.Id).Msg("could not load old account representation during update, maybe the account got deleted meanwhile?") return merrors.InternalServerError(s.id, "could not load current account for update: %v", err.Error()) @@ -653,7 +655,7 @@ var updatableAccountPaths = map[string]struct{}{ } // DeleteAccount implements the AccountsServiceHandler interface -func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountRequest, out *empty.Empty) (err error) { +func (s Service) DeleteAccount(ctx context.Context, in *accountssvc.DeleteAccountRequest, out *empty.Empty) (err error) { var span trace.Span ctx, span = accTracing.TraceProvider.Tracer("accounts").Start(ctx, "Accounts.DeleteAccount") @@ -668,7 +670,7 @@ func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountReque return merrors.InternalServerError(s.id, "could not clean up account id: %v", err.Error()) } - a := &proto.Account{} + a := &accountsmsg.Account{} if err = s.repo.LoadAccount(ctx, id, a); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "account not found: %v", err.Error()) @@ -680,7 +682,7 @@ func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountReque // delete member relationship in groups for i := range a.MemberOf { - err = s.RemoveMember(ctx, &proto.RemoveMemberRequest{ + err = s.RemoveMember(ctx, &accountssvc.RemoveMemberRequest{ GroupId: a.MemberOf[i].Id, AccountId: id, }, a.MemberOf[i]) @@ -707,7 +709,7 @@ func (s Service) DeleteAccount(ctx context.Context, in *proto.DeleteAccountReque return } -func validateAccount(serviceID string, a *proto.Account) error { +func validateAccount(serviceID string, a *accountsmsg.Account) error { if err := validateAccountPreferredName(serviceID, a); err != nil { return err } @@ -720,21 +722,21 @@ func validateAccount(serviceID string, a *proto.Account) error { return nil } -func validateAccountPreferredName(serviceID string, a *proto.Account) error { +func validateAccountPreferredName(serviceID string, a *accountsmsg.Account) error { if !isValidUsername(a.PreferredName) { return merrors.BadRequest(serviceID, "preferred_name '%s' must be at least the local part of an email", a.PreferredName) } return nil } -func validateAccountOnPremisesSamAccountName(serviceID string, a *proto.Account) error { +func validateAccountOnPremisesSamAccountName(serviceID string, a *accountsmsg.Account) error { if !isValidUsername(a.OnPremisesSamAccountName) { return merrors.BadRequest(serviceID, "on_premises_sam_account_name '%s' must be at least the local part of an email", a.OnPremisesSamAccountName) } return nil } -func validateAccountEmail(serviceID string, a *proto.Account) error { +func validateAccountEmail(serviceID string, a *accountsmsg.Account) error { if !isValidEmail(a.Mail) { return merrors.BadRequest(serviceID, "mail '%s' must be a valid email", a.Mail) } @@ -808,7 +810,7 @@ func validateUpdate(mask *field_mask.FieldMask, updatablePaths map[string]struct } // debugLogAccount returns a debug-log event with detailed account-info, and filtered password data -func (s Service) debugLogAccount(a *proto.Account) *zerolog.Event { +func (s Service) debugLogAccount(a *accountsmsg.Account) *zerolog.Event { return s.log.Debug().Fields(map[string]interface{}{ "Id": a.Id, "Mail": a.Mail, @@ -834,7 +836,7 @@ func (s Service) debugLogAccount(a *proto.Account) *zerolog.Event { func (s Service) accountExists(ctx context.Context, username, mail, id string) (exists bool, err error) { var ids []string - ids, err = s.index.FindBy(&proto.Account{}, "preferred_name", username) + ids, err = s.index.FindBy(&accountsmsg.Account{}, "preferred_name", username) if err != nil { return false, err } @@ -842,7 +844,7 @@ func (s Service) accountExists(ctx context.Context, username, mail, id string) ( return true, nil } - ids, err = s.index.FindBy(&proto.Account{}, "on_premises_sam_account_name", username) + ids, err = s.index.FindBy(&accountsmsg.Account{}, "on_premises_sam_account_name", username) if err != nil { return false, err } @@ -850,7 +852,7 @@ func (s Service) accountExists(ctx context.Context, username, mail, id string) ( return true, nil } - ids, err = s.index.FindBy(&proto.Account{}, "mail", mail) + ids, err = s.index.FindBy(&accountsmsg.Account{}, "mail", mail) if err != nil { return false, err } @@ -858,7 +860,7 @@ func (s Service) accountExists(ctx context.Context, username, mail, id string) ( return true, nil } - a := &proto.Account{} + a := &accountsmsg.Account{} err = s.repo.LoadAccount(ctx, id, a) if err == nil { return true, nil diff --git a/accounts/pkg/service/v0/accounts_permission_test.go b/accounts/pkg/service/v0/accounts_permission_test.go index 0cb47746801..2de0edc4a88 100644 --- a/accounts/pkg/service/v0/accounts_permission_test.go +++ b/accounts/pkg/service/v0/accounts_permission_test.go @@ -9,9 +9,11 @@ import ( "testing" "time" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/golang/protobuf/ptypes/empty" "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" olog "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" @@ -98,10 +100,10 @@ func TestPermissionsListAccounts(t *testing.T) { defer teardown() ctx := buildTestCtx(t, scenario.roleIDs) - request := &proto.ListAccountsRequest{ + request := &accountssvc.ListAccountsRequest{ Query: scenario.query, } - response := &proto.ListAccountsResponse{} + response := &accountssvc.ListAccountsResponse{} err := s.ListAccounts(ctx, request, response) if scenario.permissionError != nil { assert.Equal(t, scenario.permissionError, err) @@ -145,8 +147,8 @@ func TestPermissionsGetAccount(t *testing.T) { defer teardown() ctx := buildTestCtx(t, scenario.roleIDs) - request := &proto.GetAccountRequest{} - response := &proto.Account{} + request := &accountssvc.GetAccountRequest{} + response := &accountsmsg.Account{} err := s.GetAccount(ctx, request, response) if scenario.permissionError != nil { assert.Equal(t, scenario.permissionError, err) @@ -193,8 +195,8 @@ func TestPermissionsCreateAccount(t *testing.T) { defer teardown() ctx := buildTestCtx(t, scenario.roleIDs) - request := &proto.CreateAccountRequest{} - response := &proto.Account{} + request := &accountssvc.CreateAccountRequest{} + response := &accountsmsg.Account{} err := s.CreateAccount(ctx, request, response) if scenario.permissionError != nil { assert.Equal(t, scenario.permissionError, err) @@ -241,8 +243,8 @@ func TestPermissionsUpdateAccount(t *testing.T) { defer teardown() ctx := buildTestCtx(t, scenario.roleIDs) - request := &proto.UpdateAccountRequest{} - response := &proto.Account{} + request := &accountssvc.UpdateAccountRequest{} + response := &accountsmsg.Account{} err := s.UpdateAccount(ctx, request, response) if scenario.permissionError != nil { assert.Equal(t, scenario.permissionError, err) @@ -289,7 +291,7 @@ func TestPermissionsDeleteAccount(t *testing.T) { defer teardown() ctx := buildTestCtx(t, scenario.roleIDs) - request := &proto.DeleteAccountRequest{} + request := &accountssvc.DeleteAccountRequest{} response := &empty.Empty{} err := s.DeleteAccount(ctx, request, response) if scenario.permissionError != nil { diff --git a/accounts/pkg/service/v0/groups.go b/accounts/pkg/service/v0/groups.go index e719efefba3..2bd2245efa6 100644 --- a/accounts/pkg/service/v0/groups.go +++ b/accounts/pkg/service/v0/groups.go @@ -5,22 +5,24 @@ import ( "path" "strconv" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/accounts/pkg/storage" merrors "go-micro.dev/v4/errors" p "google.golang.org/protobuf/proto" ) -func (s Service) expandMembers(g *proto.Group) { +func (s Service) expandMembers(g *accountsmsg.Group) { if g == nil { return } - expanded := []*proto.Account{} + expanded := []*accountsmsg.Account{} for i := range g.Members { // TODO resolve by name, when a create or update is issued they may not have an id? fall back to searching the group id in the index? - a := &proto.Account{} + a := &accountsmsg.Account{} if err := s.repo.LoadAccount(context.Background(), g.Members[i].Id, a); err == nil { expanded = append(expanded, a) } else { @@ -32,14 +34,14 @@ func (s Service) expandMembers(g *proto.Group) { } // deflateMembers replaces the users of a group with an instance that only contains the id -func (s Service) deflateMembers(g *proto.Group) { +func (s Service) deflateMembers(g *accountsmsg.Group) { if g == nil { return } - deflated := []*proto.Account{} + deflated := []*accountsmsg.Account{} for i := range g.Members { if g.Members[i].Id != "" { - deflated = append(deflated, &proto.Account{Id: g.Members[i].Id}) + deflated = append(deflated, &accountsmsg.Account{Id: g.Members[i].Id}) } else { // TODO fetch and use an id when group only has a name but no id s.log.Error().Str("id", g.Id).Interface("account", g.Members[i]).Msg("resolving members by name is not implemented yet") @@ -49,7 +51,7 @@ func (s Service) deflateMembers(g *proto.Group) { } // ListGroups implements the GroupsServiceHandler interface -func (s Service) ListGroups(ctx context.Context, in *proto.ListGroupsRequest, out *proto.ListGroupsResponse) (err error) { +func (s Service) ListGroups(ctx context.Context, in *accountssvc.ListGroupsRequest, out *accountssvc.ListGroupsResponse) (err error) { if in.Query == "" { err = s.repo.LoadGroups(ctx, &out.Groups) if err != nil { @@ -68,10 +70,10 @@ func (s Service) ListGroups(ctx context.Context, in *proto.ListGroupsRequest, ou } searchResults, err := s.findGroupsByQuery(ctx, in.Query) - out.Groups = make([]*proto.Group, 0, len(searchResults)) + out.Groups = make([]*accountsmsg.Group, 0, len(searchResults)) for _, hit := range searchResults { - g := &proto.Group{} + g := &accountsmsg.Group{} if err = s.repo.LoadGroup(ctx, hit, g); err != nil { s.log.Error().Err(err).Str("group", hit).Msg("could not load group, skipping") continue @@ -88,11 +90,11 @@ func (s Service) ListGroups(ctx context.Context, in *proto.ListGroupsRequest, ou return } func (s Service) findGroupsByQuery(ctx context.Context, query string) ([]string, error) { - return s.index.Query(ctx, &proto.Group{}, query) + return s.index.Query(ctx, &accountsmsg.Group{}, query) } // GetGroup implements the GroupsServiceHandler interface -func (s Service) GetGroup(c context.Context, in *proto.GetGroupRequest, out *proto.Group) (err error) { +func (s Service) GetGroup(c context.Context, in *accountssvc.GetGroupRequest, out *accountsmsg.Group) (err error) { var id string if id, err = cleanupID(in.Id); err != nil { return merrors.InternalServerError(s.id, "could not clean up group id: %v", err.Error()) @@ -116,7 +118,7 @@ func (s Service) GetGroup(c context.Context, in *proto.GetGroupRequest, out *pro } // CreateGroup implements the GroupsServiceHandler interface -func (s Service) CreateGroup(c context.Context, in *proto.CreateGroupRequest, out *proto.Group) (err error) { +func (s Service) CreateGroup(c context.Context, in *accountssvc.CreateGroupRequest, out *accountsmsg.Group) (err error) { if in.Group == nil { return merrors.InternalServerError(s.id, "invalid group: empty") } @@ -159,7 +161,7 @@ func (s Service) CreateGroup(c context.Context, in *proto.CreateGroupRequest, ou } // rollbackCreateGroup tries to rollback changes made by `CreateGroup` if parts of it failed. -func (s Service) rollbackCreateGroup(ctx context.Context, group *proto.Group) { +func (s Service) rollbackCreateGroup(ctx context.Context, group *accountsmsg.Group) { err := s.index.Delete(group) if err != nil { s.log.Err(err).Msg("failed to rollback group from indices") @@ -171,18 +173,18 @@ func (s Service) rollbackCreateGroup(ctx context.Context, group *proto.Group) { } // UpdateGroup implements the GroupsServiceHandler interface -func (s Service) UpdateGroup(c context.Context, in *proto.UpdateGroupRequest, out *proto.Group) (err error) { +func (s Service) UpdateGroup(c context.Context, in *accountssvc.UpdateGroupRequest, out *accountsmsg.Group) (err error) { return merrors.InternalServerError(s.id, "not implemented") } // DeleteGroup implements the GroupsServiceHandler interface -func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, out *empty.Empty) (err error) { +func (s Service) DeleteGroup(c context.Context, in *accountssvc.DeleteGroupRequest, out *empty.Empty) (err error) { var id string if id, err = cleanupID(in.Id); err != nil { return merrors.InternalServerError(s.id, "could not clean up group id: %v", err.Error()) } - g := &proto.Group{} + g := &accountsmsg.Group{} if err = s.repo.LoadGroup(c, id, g); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "group not found: %v", err.Error()) @@ -192,7 +194,7 @@ func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, ou // delete memberof relationship in users for i := range g.Members { - err = s.RemoveMember(c, &proto.RemoveMemberRequest{ + err = s.RemoveMember(c, &accountssvc.RemoveMemberRequest{ AccountId: g.Members[i].Id, GroupId: id, }, g) @@ -219,7 +221,7 @@ func (s Service) DeleteGroup(c context.Context, in *proto.DeleteGroupRequest, ou } // AddMember implements the GroupsServiceHandler interface -func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *proto.Group) (err error) { +func (s Service) AddMember(c context.Context, in *accountssvc.AddMemberRequest, out *accountsmsg.Group) (err error) { // cleanup ids var groupID string if groupID, err = cleanupID(in.GroupId); err != nil { @@ -232,7 +234,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p } // load structs - a := &proto.Account{} + a := &accountsmsg.Account{} if err = s.repo.LoadAccount(c, accountID, a); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "group not found: %v", err.Error()) @@ -240,7 +242,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p return merrors.InternalServerError(s.id, "could not load group: %v", err.Error()) } - g := &proto.Group{} + g := &accountsmsg.Group{} if err = s.repo.LoadGroup(c, groupID, g); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "could not load group: %v", err.Error()) @@ -255,7 +257,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p alreadyRelated = true } } - aref := &proto.Account{ + aref := &accountsmsg.Account{ Id: a.Id, } if !alreadyRelated { @@ -271,7 +273,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p } } // only store the reference to prevent recursion when marshaling json - gref := &proto.Group{ + gref := &accountsmsg.Group{ Id: g.Id, } if !alreadyRelated { @@ -292,7 +294,7 @@ func (s Service) AddMember(c context.Context, in *proto.AddMemberRequest, out *p } // RemoveMember implements the GroupsServiceHandler interface -func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, out *proto.Group) (err error) { +func (s Service) RemoveMember(c context.Context, in *accountssvc.RemoveMemberRequest, out *accountsmsg.Group) (err error) { // cleanup ids var groupID string @@ -306,7 +308,7 @@ func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, } // load structs - a := &proto.Account{} + a := &accountsmsg.Account{} if err = s.repo.LoadAccount(c, accountID, a); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "could not load account: %v", err.Error()) @@ -315,7 +317,7 @@ func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, return merrors.InternalServerError(s.id, "could not load account: %v", err.Error()) } - g := &proto.Group{} + g := &accountsmsg.Group{} if err = s.repo.LoadGroup(c, groupID, g); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "could not load group: %v", err.Error()) @@ -325,7 +327,7 @@ func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, } //remove the account from the group if it exists - newMembers := []*proto.Account{} + newMembers := []*accountsmsg.Account{} for i := range g.Members { if g.Members[i].Id != a.Id { newMembers = append(newMembers, g.Members[i]) @@ -334,7 +336,7 @@ func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, g.Members = newMembers // remove the group from the account if it exists - newGroups := []*proto.Group{} + newGroups := []*accountsmsg.Group{} for i := range a.MemberOf { if a.MemberOf[i].Id != g.Id { newGroups = append(newGroups, a.MemberOf[i]) @@ -358,14 +360,14 @@ func (s Service) RemoveMember(c context.Context, in *proto.RemoveMemberRequest, } // ListMembers implements the GroupsServiceHandler interface -func (s Service) ListMembers(c context.Context, in *proto.ListMembersRequest, out *proto.ListMembersResponse) (err error) { +func (s Service) ListMembers(c context.Context, in *accountssvc.ListMembersRequest, out *accountssvc.ListMembersResponse) (err error) { // cleanup ids var groupID string if groupID, err = cleanupID(in.Id); err != nil { return merrors.InternalServerError(s.id, "could not clean up group id: %v", err.Error()) } - g := &proto.Group{} + g := &accountsmsg.Group{} if err = s.repo.LoadGroup(c, groupID, g); err != nil { if storage.IsNotFoundErr(err) { return merrors.NotFound(s.id, "group not found: %v", err.Error()) diff --git a/accounts/pkg/service/v0/index.go b/accounts/pkg/service/v0/index.go index a2c863baa1a..770c4991215 100644 --- a/accounts/pkg/service/v0/index.go +++ b/accounts/pkg/service/v0/index.go @@ -4,16 +4,18 @@ import ( "context" "fmt" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/storage" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/indexer" "github.com/owncloud/ocis/ocis-pkg/indexer/config" "github.com/owncloud/ocis/ocis-pkg/indexer/option" ) // RebuildIndex deletes all indices (in memory and on storage) and rebuilds them from scratch. -func (s Service) RebuildIndex(ctx context.Context, request *proto.RebuildIndexRequest, response *proto.RebuildIndexResponse) error { +func (s Service) RebuildIndex(ctx context.Context, request *accountssvc.RebuildIndexRequest, response *accountssvc.RebuildIndexResponse) error { if err := s.index.Reset(); err != nil { return fmt.Errorf("failed to delete index containers: %w", err) } @@ -36,26 +38,26 @@ func (s Service) RebuildIndex(ctx context.Context, request *proto.RebuildIndexRe // recreateContainers adds all indices to the indexer that we have for this service. func recreateContainers(idx *indexer.Indexer, cfg *config.Config) error { // Accounts - if err := idx.AddIndex(&proto.Account{}, "Id", "Id", "accounts", "non_unique", nil, true); err != nil { + if err := idx.AddIndex(&accountsmsg.Account{}, "Id", "Id", "accounts", "non_unique", nil, true); err != nil { return err } - if err := idx.AddIndex(&proto.Account{}, "DisplayName", "Id", "accounts", "non_unique", nil, true); err != nil { + if err := idx.AddIndex(&accountsmsg.Account{}, "DisplayName", "Id", "accounts", "non_unique", nil, true); err != nil { return err } - if err := idx.AddIndex(&proto.Account{}, "Mail", "Id", "accounts", "unique", nil, true); err != nil { + if err := idx.AddIndex(&accountsmsg.Account{}, "Mail", "Id", "accounts", "unique", nil, true); err != nil { return err } - if err := idx.AddIndex(&proto.Account{}, "OnPremisesSamAccountName", "Id", "accounts", "unique", nil, true); err != nil { + if err := idx.AddIndex(&accountsmsg.Account{}, "OnPremisesSamAccountName", "Id", "accounts", "unique", nil, true); err != nil { return err } - if err := idx.AddIndex(&proto.Account{}, "PreferredName", "Id", "accounts", "unique", nil, true); err != nil { + if err := idx.AddIndex(&accountsmsg.Account{}, "PreferredName", "Id", "accounts", "unique", nil, true); err != nil { return err } - if err := idx.AddIndex(&proto.Account{}, "UidNumber", "Id", "accounts", "autoincrement", &option.Bound{ + if err := idx.AddIndex(&accountsmsg.Account{}, "UidNumber", "Id", "accounts", "autoincrement", &option.Bound{ Lower: cfg.Index.UID.Lower, Upper: cfg.Index.UID.Upper, }, false); err != nil { @@ -63,15 +65,15 @@ func recreateContainers(idx *indexer.Indexer, cfg *config.Config) error { } // Groups - if err := idx.AddIndex(&proto.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, false); err != nil { + if err := idx.AddIndex(&accountsmsg.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, false); err != nil { return err } - if err := idx.AddIndex(&proto.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, false); err != nil { + if err := idx.AddIndex(&accountsmsg.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, false); err != nil { return err } - if err := idx.AddIndex(&proto.Group{}, "GidNumber", "Id", "groups", "autoincrement", &option.Bound{ + if err := idx.AddIndex(&accountsmsg.Group{}, "GidNumber", "Id", "groups", "autoincrement", &option.Bound{ Lower: cfg.Index.GID.Lower, Upper: cfg.Index.GID.Upper, }, false); err != nil { @@ -83,7 +85,7 @@ func recreateContainers(idx *indexer.Indexer, cfg *config.Config) error { // reindexDocuments loads all existing documents and adds them to the index. func reindexDocuments(ctx context.Context, repo storage.Repo, index *indexer.Indexer) error { - accounts := make([]*proto.Account, 0) + accounts := make([]*accountsmsg.Account, 0) if err := repo.LoadAccounts(ctx, &accounts); err != nil { return err } @@ -94,7 +96,7 @@ func reindexDocuments(ctx context.Context, repo storage.Repo, index *indexer.Ind } } - groups := make([]*proto.Group, 0) + groups := make([]*accountsmsg.Group, 0) if err := repo.LoadGroups(ctx, &groups); err != nil { return err } diff --git a/accounts/pkg/service/v0/service.go b/accounts/pkg/service/v0/service.go index 18703e80515..d3beef89526 100644 --- a/accounts/pkg/service/v0/service.go +++ b/accounts/pkg/service/v0/service.go @@ -8,6 +8,7 @@ import ( "strings" "time" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" "github.com/pkg/errors" "github.com/owncloud/ocis/ocis-pkg/service/grpc" @@ -18,7 +19,6 @@ import ( idxerrs "github.com/owncloud/ocis/ocis-pkg/indexer/errors" "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" oreg "github.com/owncloud/ocis/ocis-pkg/registry" "github.com/owncloud/ocis/ocis-pkg/roles" @@ -162,7 +162,7 @@ func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) { } func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { - accounts := []proto.Account{ + accounts := []accountsmsg.Account{ { Id: "4c510ada-c86b-4815-8820-42cdf82c3d51", PreferredName: "einstein", @@ -171,11 +171,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Albert Einstein", UidNumber: 20000, GidNumber: 30000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$4WNffzgU/WrIRiDnwu8OnOwgOIIUqR/2Ptvp7WJAQCTSgSrylyuvC", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users {Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0"}, // sailing-lovers {Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f"}, // violin-haters @@ -190,11 +190,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Marie Curie", UidNumber: 20001, GidNumber: 30000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$Wu2XcDnE6G2No8C88FVWluNHyXuQQi0cHzSe82Vni8AdwIO12fphC", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users {Id: "7b87fd49-286e-4a5f-bafd-c535d5dd997a"}, // radium-lovers {Id: "cedc21aa-4072-4614-8676-fa9165f598ff"}, // polonium-lovers @@ -209,11 +209,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Richard Feynman", UidNumber: 20002, GidNumber: 30000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$6Lak4zh1xUkpObg2rrOotOTdQYGj2Uu/sowcVLhub.8qYIr.CxzEW", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users {Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a"}, // quantum-lovers {Id: "167cbee2-0518-455a-bfb2-031fe0621e5d"}, // philosophy-haters @@ -229,11 +229,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Maurice Moss", UidNumber: 20003, GidNumber: 30000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$jvI6PHuvrimpcCHzL2Q2WOqfm1FGdYAuSYZBDahr/B48fpiFxyDy2", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users }, }, @@ -245,11 +245,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Admin", UidNumber: 20004, GidNumber: 30000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$En9VIUtqOdDyUl.LuUq2KeuBb5A2n8zE0lkJ2v6IDRSaOamhNq6Uu", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users }, }, @@ -262,11 +262,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Kopano IDP", UidNumber: 10000, GidNumber: 15000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2y$12$ywfGLDPsSlBTVZU0g.2GZOPO8Wap3rVOpm8e3192VlytNdGWH7x72", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "34f38767-c937-4eb6-b847-1c175829a2a0"}, // sysusers }, }, @@ -278,11 +278,11 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { DisplayName: "Reva Inter Operability Platform", UidNumber: 10001, GidNumber: 15000, - PasswordProfile: &proto.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: "$2a$11$40xzy3rO8Tq4j2VkFbKz8Ow19BRaqaixEjAR0IbvQXxtOvMtkjwzy", }, AccountEnabled: true, - MemberOf: []*proto.Group{ + MemberOf: []*accountsmsg.Group{ {Id: "34f38767-c937-4eb6-b847-1c175829a2a0"}, // sysusers }, }, @@ -300,7 +300,7 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { continue } - a := &proto.Account{} + a := &accountsmsg.Account{} err := s.repo.LoadAccount(context.Background(), accounts[i].Id, a) if !storage.IsNotFoundErr(err) { continue // account already exists -> do not overwrite @@ -344,35 +344,35 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) { } func (s Service) createDefaultGroups(withDemoGroups bool) (err error) { - groups := []proto.Group{ - {Id: "34f38767-c937-4eb6-b847-1c175829a2a0", GidNumber: 15000, OnPremisesSamAccountName: "sysusers", DisplayName: "Technical users", Description: "A group for technical users. They should not show up in sharing dialogs.", Members: []*proto.Account{ + groups := []accountsmsg.Group{ + {Id: "34f38767-c937-4eb6-b847-1c175829a2a0", GidNumber: 15000, OnPremisesSamAccountName: "sysusers", DisplayName: "Technical users", Description: "A group for technical users. They should not show up in sharing dialogs.", Members: []*accountsmsg.Account{ {Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf"}, // idp {Id: "bc596f3c-c955-4328-80a0-60d018b4ad57"}, // reva }}, - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa", GidNumber: 30000, OnPremisesSamAccountName: "users", DisplayName: "Users", Description: "A group every normal user belongs to.", Members: []*proto.Account{ + {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa", GidNumber: 30000, OnPremisesSamAccountName: "users", DisplayName: "Users", Description: "A group every normal user belongs to.", Members: []*accountsmsg.Account{ {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman }}, - {Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*proto.Account{ + {Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*accountsmsg.Account{ {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein }}, - {Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*proto.Account{ + {Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*accountsmsg.Account{ {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein }}, - {Id: "7b87fd49-286e-4a5f-bafd-c535d5dd997a", GidNumber: 30003, OnPremisesSamAccountName: "radium-lovers", DisplayName: "Radium lovers", Members: []*proto.Account{ + {Id: "7b87fd49-286e-4a5f-bafd-c535d5dd997a", GidNumber: 30003, OnPremisesSamAccountName: "radium-lovers", DisplayName: "Radium lovers", Members: []*accountsmsg.Account{ {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie }}, - {Id: "cedc21aa-4072-4614-8676-fa9165f598ff", GidNumber: 30004, OnPremisesSamAccountName: "polonium-lovers", DisplayName: "Polonium lovers", Members: []*proto.Account{ + {Id: "cedc21aa-4072-4614-8676-fa9165f598ff", GidNumber: 30004, OnPremisesSamAccountName: "polonium-lovers", DisplayName: "Polonium lovers", Members: []*accountsmsg.Account{ {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie }}, - {Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*proto.Account{ + {Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*accountsmsg.Account{ {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman }}, - {Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*proto.Account{ + {Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*accountsmsg.Account{ {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman }}, - {Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e", GidNumber: 30007, OnPremisesSamAccountName: "physics-lovers", DisplayName: "Physics lovers", Members: []*proto.Account{ + {Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e", GidNumber: 30007, OnPremisesSamAccountName: "physics-lovers", DisplayName: "Physics lovers", Members: []*accountsmsg.Account{ {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman @@ -389,7 +389,7 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) { continue } - g := &proto.Group{} + g := &accountsmsg.Group{} err := s.repo.LoadGroup(context.Background(), groups[i].Id, g) if !storage.IsNotFoundErr(err) { continue // group already exists -> do not overwrite diff --git a/accounts/pkg/storage/cs3.go b/accounts/pkg/storage/cs3.go index c50f68be52d..58df10d2f7d 100644 --- a/accounts/pkg/storage/cs3.go +++ b/accounts/pkg/storage/cs3.go @@ -16,9 +16,9 @@ import ( "github.com/cs3org/reva/pkg/token/manager/jwt" "github.com/cs3org/reva/pkg/utils" "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" olog "github.com/owncloud/ocis/ocis-pkg/log" metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" "google.golang.org/grpc/metadata" ) @@ -69,7 +69,7 @@ func NewCS3Repo(cfg *config.Config) (Repo, error) { } // WriteAccount writes an account via cs3 and modifies the provided account (e.g. with a generated id). -func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error) { +func (r CS3Repo) WriteAccount(ctx context.Context, a *accountsmsg.Account) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -90,7 +90,7 @@ func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error) } // LoadAccount loads an account via cs3 by id and writes it to the provided account -func (r CS3Repo) LoadAccount(ctx context.Context, id string, a *proto.Account) (err error) { +func (r CS3Repo) LoadAccount(ctx context.Context, id string, a *accountsmsg.Account) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -100,7 +100,7 @@ func (r CS3Repo) LoadAccount(ctx context.Context, id string, a *proto.Account) ( } // LoadAccounts loads all the accounts from the cs3 api -func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err error) { +func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*accountsmsg.Account) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -118,7 +118,7 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level)) for i := range res.Infos { - acc := &proto.Account{} + acc := &accountsmsg.Account{} err := r.loadAccount(ctx, filepath.Base(res.Infos[i].Path), acc) if err != nil { log.Err(err).Msg("could not load account") @@ -129,7 +129,7 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err return nil } -func (r CS3Repo) loadAccount(ctx context.Context, id string, a *proto.Account) error { +func (r CS3Repo) loadAccount(ctx context.Context, id string, a *accountsmsg.Account) error { account, err := r.metadataStorage.SimpleDownload(ctx, r.accountURL(id)) if err != nil { if metadatastorage.IsNotFoundErr(err) { @@ -167,7 +167,7 @@ func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) { } // WriteGroup writes a group via cs3 and modifies the provided group (e.g. with a generated id). -func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) { +func (r CS3Repo) WriteGroup(ctx context.Context, g *accountsmsg.Group) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -187,7 +187,7 @@ func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) { } // LoadGroup loads a group via cs3 by id and writes it to the provided group -func (r CS3Repo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err error) { +func (r CS3Repo) LoadGroup(ctx context.Context, id string, g *accountsmsg.Group) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -197,7 +197,7 @@ func (r CS3Repo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err } // LoadGroups loads all the groups from the cs3 api -func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) { +func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*accountsmsg.Group) (err error) { ctx, err = r.getAuthenticatedContext(ctx) if err != nil { return err @@ -215,7 +215,7 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level)) for i := range res.Infos { - grp := &proto.Group{} + grp := &accountsmsg.Group{} err := r.loadGroup(ctx, filepath.Base(res.Infos[i].Path), grp) if err != nil { log.Err(err).Msg("could not load account") @@ -226,7 +226,7 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) return nil } -func (r CS3Repo) loadGroup(ctx context.Context, id string, g *proto.Group) error { +func (r CS3Repo) loadGroup(ctx context.Context, id string, g *accountsmsg.Group) error { group, err := r.metadataStorage.SimpleDownload(ctx, r.groupURL(id)) if err != nil { if metadatastorage.IsNotFoundErr(err) { diff --git a/accounts/pkg/storage/cs3_test.go b/accounts/pkg/storage/cs3_test.go index 70ef0afb979..f092489a96c 100644 --- a/accounts/pkg/storage/cs3_test.go +++ b/accounts/pkg/storage/cs3_test.go @@ -4,8 +4,8 @@ package storage //import ( // "context" +// accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" // "github.com/owncloud/ocis/accounts/pkg/config" -// "github.com/owncloud/ocis/accounts/pkg/proto/v0" // "github.com/stretchr/testify/assert" // "testing" //) @@ -25,7 +25,7 @@ package storage // r, err := NewCS3Repo("hello", cfg) // assert.NoError(t, err) // -// err = r.WriteAccount(context.Background(), &proto.Account{ +// err = r.WriteAccount(context.Background(), &accountsmsg.Account{ // Id: "fefef-egegweg-gegeg", // AccountEnabled: true, // DisplayName: "Mike Jones", @@ -39,14 +39,14 @@ package storage // r, err := NewCS3Repo("hello", cfg) // assert.NoError(t, err) // -// err = r.WriteAccount(context.Background(), &proto.Account{ +// err = r.WriteAccount(context.Background(), &accountsmsg.Account{ // Id: "fefef-egegweg-gegeg", // AccountEnabled: true, // DisplayName: "Mike Jones", // Mail: "mike@example.com", // }) // -// acc := &proto.Account{} +// acc := &accountsmsg.Account{} // err = r.LoadAccount(context.Background(), "fefef-egegweg-gegeg", acc) // // assert.NoError(t, err) @@ -59,7 +59,7 @@ package storage // r, err := NewCS3Repo("hello", cfg) // assert.NoError(t, err) // -// err = r.WriteAccount(context.Background(), &proto.Account{ +// err = r.WriteAccount(context.Background(), &accountsmsg.Account{ // Id: "delete-me-id", // AccountEnabled: true, // DisplayName: "Mike Jones", diff --git a/accounts/pkg/storage/disk.go b/accounts/pkg/storage/disk.go index 8cd19362cbf..15eb096fe8b 100644 --- a/accounts/pkg/storage/disk.go +++ b/accounts/pkg/storage/disk.go @@ -8,8 +8,9 @@ import ( "path/filepath" "sync" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" olog "github.com/owncloud/ocis/ocis-pkg/log" ) @@ -43,7 +44,7 @@ func NewDiskRepo(cfg *config.Config, log olog.Logger) DiskRepo { } // WriteAccount to the local filesystem -func (r DiskRepo) WriteAccount(ctx context.Context, a *proto.Account) (err error) { +func (r DiskRepo) WriteAccount(ctx context.Context, a *accountsmsg.Account) (err error) { // leave only the group id r.deflateMemberOf(a) @@ -57,7 +58,7 @@ func (r DiskRepo) WriteAccount(ctx context.Context, a *proto.Account) (err error } // LoadAccount from the local filesystem -func (r DiskRepo) LoadAccount(ctx context.Context, id string, a *proto.Account) (err error) { +func (r DiskRepo) LoadAccount(ctx context.Context, id string, a *accountsmsg.Account) (err error) { path := filepath.Join(r.cfg.Repo.Disk.Path, accountsFolder, id) var data []byte if data, err = ioutil.ReadFile(path); err != nil { @@ -71,14 +72,14 @@ func (r DiskRepo) LoadAccount(ctx context.Context, id string, a *proto.Account) } // LoadAccounts loads all the accounts from the local filesystem -func (r DiskRepo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err error) { +func (r DiskRepo) LoadAccounts(ctx context.Context, a *[]*accountsmsg.Account) (err error) { root := filepath.Join(r.cfg.Repo.Disk.Path, accountsFolder) infos, err := ioutil.ReadDir(root) if err != nil { return err } for i := range infos { - acc := &proto.Account{} + acc := &accountsmsg.Account{} if e := r.LoadAccount(ctx, infos[i].Name(), acc); e != nil { r.log.Err(e).Msg("could not load account") continue @@ -101,7 +102,7 @@ func (r DiskRepo) DeleteAccount(ctx context.Context, id string) (err error) { } // WriteGroup to the local filesystem -func (r DiskRepo) WriteGroup(ctx context.Context, g *proto.Group) (err error) { +func (r DiskRepo) WriteGroup(ctx context.Context, g *accountsmsg.Group) (err error) { // leave only the member id r.deflateMembers(g) @@ -119,7 +120,7 @@ func (r DiskRepo) WriteGroup(ctx context.Context, g *proto.Group) (err error) { } // LoadGroup from the local filesystem -func (r DiskRepo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err error) { +func (r DiskRepo) LoadGroup(ctx context.Context, id string, g *accountsmsg.Group) (err error) { path := filepath.Join(r.cfg.Repo.Disk.Path, groupsFolder, id) groupLock.Lock() @@ -137,14 +138,14 @@ func (r DiskRepo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err } // LoadGroups loads all the groups from the local filesystem -func (r DiskRepo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) { +func (r DiskRepo) LoadGroups(ctx context.Context, g *[]*accountsmsg.Group) (err error) { root := filepath.Join(r.cfg.Repo.Disk.Path, groupsFolder) infos, err := ioutil.ReadDir(root) if err != nil { return err } for i := range infos { - grp := &proto.Group{} + grp := &accountsmsg.Group{} if e := r.LoadGroup(ctx, infos[i].Name(), grp); e != nil { r.log.Err(e).Msg("could not load group") continue @@ -167,14 +168,14 @@ func (r DiskRepo) DeleteGroup(ctx context.Context, id string) (err error) { } // deflateMemberOf replaces the groups of a user with an instance that only contains the id -func (r DiskRepo) deflateMemberOf(a *proto.Account) { +func (r DiskRepo) deflateMemberOf(a *accountsmsg.Account) { if a == nil { return } - var deflated []*proto.Group + var deflated []*accountsmsg.Group for i := range a.MemberOf { if a.MemberOf[i].Id != "" { - deflated = append(deflated, &proto.Group{Id: a.MemberOf[i].Id}) + deflated = append(deflated, &accountsmsg.Group{Id: a.MemberOf[i].Id}) } else { // TODO fetch and use an id when group only has a name but no id r.log.Error().Str("id", a.Id).Interface("group", a.MemberOf[i]).Msg("resolving groups by name is not implemented yet") @@ -184,14 +185,14 @@ func (r DiskRepo) deflateMemberOf(a *proto.Account) { } // deflateMembers replaces the users of a group with an instance that only contains the id -func (r DiskRepo) deflateMembers(g *proto.Group) { +func (r DiskRepo) deflateMembers(g *accountsmsg.Group) { if g == nil { return } - var deflated []*proto.Account + var deflated []*accountsmsg.Account for i := range g.Members { if g.Members[i].Id != "" { - deflated = append(deflated, &proto.Account{Id: g.Members[i].Id}) + deflated = append(deflated, &accountsmsg.Account{Id: g.Members[i].Id}) } else { // TODO fetch and use an id when group only has a name but no id r.log.Error().Str("id", g.Id).Interface("account", g.Members[i]).Msg("resolving members by name is not implemented yet") diff --git a/accounts/pkg/storage/repo.go b/accounts/pkg/storage/repo.go index 739dff43a82..84617f2c0f9 100644 --- a/accounts/pkg/storage/repo.go +++ b/accounts/pkg/storage/repo.go @@ -3,7 +3,7 @@ package storage import ( "context" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" ) const ( @@ -13,12 +13,12 @@ const ( // Repo defines the storage operations type Repo interface { - WriteAccount(ctx context.Context, a *proto.Account) (err error) - LoadAccount(ctx context.Context, id string, a *proto.Account) (err error) - LoadAccounts(ctx context.Context, a *[]*proto.Account) (err error) + WriteAccount(ctx context.Context, a *accountsmsg.Account) (err error) + LoadAccount(ctx context.Context, id string, a *accountsmsg.Account) (err error) + LoadAccounts(ctx context.Context, a *[]*accountsmsg.Account) (err error) DeleteAccount(ctx context.Context, id string) (err error) - WriteGroup(ctx context.Context, g *proto.Group) (err error) - LoadGroup(ctx context.Context, id string, g *proto.Group) (err error) - LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) + WriteGroup(ctx context.Context, g *accountsmsg.Group) (err error) + LoadGroup(ctx context.Context, id string, g *accountsmsg.Group) (err error) + LoadGroups(ctx context.Context, g *[]*accountsmsg.Group) (err error) DeleteGroup(ctx context.Context, id string) (err error) } diff --git a/accounts/ui/client/accounts/index.js b/accounts/ui/client/accounts/index.js index 01e5d997251..2cde5cf77e6 100644 --- a/accounts/ui/client/accounts/index.js +++ b/accounts/ui/client/accounts/index.js @@ -25,7 +25,7 @@ export const request = (method, url, body, queryParameters, form, config) => { } } /*========================================================== - * + * ==========================================================*/ /** * Creates an account @@ -33,12 +33,12 @@ export const request = (method, url, body, queryParameters, form, config) => { * url: AccountsService_CreateAccountURL * method: AccountsService_CreateAccount_TYPE * raw_url: AccountsService_CreateAccount_RAW_URL - * @param body - + * @param body - */ export const AccountsService_CreateAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/accounts/accounts-create' + let path = '/api/v1/accounts/accounts-create' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const AccountsService_CreateAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_CreateAccount_RAW_URL = function() { - return '/api/v0/accounts/accounts-create' + return '/api/v1/accounts/accounts-create' } export const AccountsService_CreateAccount_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const AccountsService_CreateAccount_TYPE = function() { export const AccountsService_CreateAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/accounts/accounts-create' + let path = '/api/v1/accounts/accounts-create' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -79,12 +79,12 @@ export const AccountsService_CreateAccountURL = function(parameters = {}) { * url: AccountsService_DeleteAccountURL * method: AccountsService_DeleteAccount_TYPE * raw_url: AccountsService_DeleteAccount_RAW_URL - * @param body - + * @param body - */ export const AccountsService_DeleteAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/accounts/accounts-delete' + let path = '/api/v1/accounts/accounts-delete' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const AccountsService_DeleteAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_DeleteAccount_RAW_URL = function() { - return '/api/v0/accounts/accounts-delete' + return '/api/v1/accounts/accounts-delete' } export const AccountsService_DeleteAccount_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const AccountsService_DeleteAccount_TYPE = function() { export const AccountsService_DeleteAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/accounts/accounts-delete' + let path = '/api/v1/accounts/accounts-delete' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -125,12 +125,12 @@ export const AccountsService_DeleteAccountURL = function(parameters = {}) { * url: AccountsService_GetAccountURL * method: AccountsService_GetAccount_TYPE * raw_url: AccountsService_GetAccount_RAW_URL - * @param body - + * @param body - */ export const AccountsService_GetAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/accounts/accounts-get' + let path = '/api/v1/accounts/accounts-get' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const AccountsService_GetAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_GetAccount_RAW_URL = function() { - return '/api/v0/accounts/accounts-get' + return '/api/v1/accounts/accounts-get' } export const AccountsService_GetAccount_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const AccountsService_GetAccount_TYPE = function() { export const AccountsService_GetAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/accounts/accounts-get' + let path = '/api/v1/accounts/accounts-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -171,12 +171,12 @@ export const AccountsService_GetAccountURL = function(parameters = {}) { * url: AccountsService_ListAccountsURL * method: AccountsService_ListAccounts_TYPE * raw_url: AccountsService_ListAccounts_RAW_URL - * @param body - + * @param body - */ export const AccountsService_ListAccounts = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/accounts/accounts-list' + let path = '/api/v1/accounts/accounts-list' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const AccountsService_ListAccounts = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_ListAccounts_RAW_URL = function() { - return '/api/v0/accounts/accounts-list' + return '/api/v1/accounts/accounts-list' } export const AccountsService_ListAccounts_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const AccountsService_ListAccounts_TYPE = function() { export const AccountsService_ListAccountsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/accounts/accounts-list' + let path = '/api/v1/accounts/accounts-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -217,12 +217,12 @@ export const AccountsService_ListAccountsURL = function(parameters = {}) { * url: AccountsService_UpdateAccountURL * method: AccountsService_UpdateAccount_TYPE * raw_url: AccountsService_UpdateAccount_RAW_URL - * @param body - + * @param body - */ export const AccountsService_UpdateAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/accounts/accounts-update' + let path = '/api/v1/accounts/accounts-update' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const AccountsService_UpdateAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_UpdateAccount_RAW_URL = function() { - return '/api/v0/accounts/accounts-update' + return '/api/v1/accounts/accounts-update' } export const AccountsService_UpdateAccount_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const AccountsService_UpdateAccount_TYPE = function() { export const AccountsService_UpdateAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/accounts/accounts-update' + let path = '/api/v1/accounts/accounts-update' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -287,7 +287,7 @@ display names that include both "Test" and "String" export const GroupsService_ListGroups = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups' + let path = '/v1/groups' let body let queryParameters = {} let form = {} @@ -311,7 +311,7 @@ export const GroupsService_ListGroups = function(parameters = {}) { return request('get', domain + path, body, queryParameters, form, config) } export const GroupsService_ListGroups_RAW_URL = function() { - return '/v0/groups' + return '/v1/groups' } export const GroupsService_ListGroups_TYPE = function() { return 'get' @@ -319,7 +319,7 @@ export const GroupsService_ListGroups_TYPE = function() { export const GroupsService_ListGroupsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups' + let path = '/v1/groups' if (parameters['pageSize'] !== undefined) { queryParameters['page_size'] = parameters['pageSize'] } @@ -351,7 +351,7 @@ export const GroupsService_ListGroupsURL = function(parameters = {}) { export const GroupsService_CreateGroup = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups' + let path = '/v1/groups' let body let queryParameters = {} let form = {} @@ -369,7 +369,7 @@ export const GroupsService_CreateGroup = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const GroupsService_CreateGroup_RAW_URL = function() { - return '/v0/groups' + return '/v1/groups' } export const GroupsService_CreateGroup_TYPE = function() { return 'post' @@ -377,7 +377,7 @@ export const GroupsService_CreateGroup_TYPE = function() { export const GroupsService_CreateGroupURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups' + let path = '/v1/groups' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -399,7 +399,7 @@ Returned by default. Inherited from directoryObject. Key. Not nullable. Read-onl export const GroupsService_UpdateGroup = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{group.id}' + let path = '/v1/groups/{group.id}' let body let queryParameters = {} let form = {} @@ -421,7 +421,7 @@ export const GroupsService_UpdateGroup = function(parameters = {}) { return request('patch', domain + path, body, queryParameters, form, config) } export const GroupsService_UpdateGroup_RAW_URL = function() { - return '/v0/groups/{group.id}' + return '/v1/groups/{group.id}' } export const GroupsService_UpdateGroup_TYPE = function() { return 'patch' @@ -429,7 +429,7 @@ export const GroupsService_UpdateGroup_TYPE = function() { export const GroupsService_UpdateGroupURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{group.id}' + let path = '/v1/groups/{group.id}' path = path.replace('{group.id}', `${parameters['groupId']}`) if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { @@ -445,12 +445,12 @@ export const GroupsService_UpdateGroupURL = function(parameters = {}) { * url: GroupsService_GetGroupURL * method: GroupsService_GetGroup_TYPE * raw_url: GroupsService_GetGroup_RAW_URL - * @param id - + * @param id - */ export const GroupsService_GetGroup = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{id}' + let path = '/v1/groups/{id}' let body let queryParameters = {} let form = {} @@ -466,7 +466,7 @@ export const GroupsService_GetGroup = function(parameters = {}) { return request('get', domain + path, body, queryParameters, form, config) } export const GroupsService_GetGroup_RAW_URL = function() { - return '/v0/groups/{id}' + return '/v1/groups/{id}' } export const GroupsService_GetGroup_TYPE = function() { return 'get' @@ -474,7 +474,7 @@ export const GroupsService_GetGroup_TYPE = function() { export const GroupsService_GetGroupURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{id}' + let path = '/v1/groups/{id}' path = path.replace('{id}', `${parameters['id']}`) if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { @@ -490,12 +490,12 @@ export const GroupsService_GetGroupURL = function(parameters = {}) { * url: GroupsService_DeleteGroupURL * method: GroupsService_DeleteGroup_TYPE * raw_url: GroupsService_DeleteGroup_RAW_URL - * @param id - + * @param id - */ export const GroupsService_DeleteGroup = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{id}' + let path = '/v1/groups/{id}' let body let queryParameters = {} let form = {} @@ -511,7 +511,7 @@ export const GroupsService_DeleteGroup = function(parameters = {}) { return request('delete', domain + path, body, queryParameters, form, config) } export const GroupsService_DeleteGroup_RAW_URL = function() { - return '/v0/groups/{id}' + return '/v1/groups/{id}' } export const GroupsService_DeleteGroup_TYPE = function() { return 'delete' @@ -519,7 +519,7 @@ export const GroupsService_DeleteGroup_TYPE = function() { export const GroupsService_DeleteGroupURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{id}' + let path = '/v1/groups/{id}' path = path.replace('{id}', `${parameters['id']}`) if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { @@ -536,7 +536,7 @@ export const GroupsService_DeleteGroupURL = function(parameters = {}) { * method: GroupsService_ListMembers_TYPE * raw_url: GroupsService_ListMembers_RAW_URL * @param id - The group id - * @param pageSize - + * @param pageSize - * @param pageToken - Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue. * @param fieldMaskPaths - The set of field mask paths. @@ -560,7 +560,7 @@ display names that include both "Test" and "String" export const GroupsService_ListMembers = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{id}/members/$ref' + let path = '/v1/groups/{id}/members/$ref' let body let queryParameters = {} let form = {} @@ -588,7 +588,7 @@ export const GroupsService_ListMembers = function(parameters = {}) { return request('get', domain + path, body, queryParameters, form, config) } export const GroupsService_ListMembers_RAW_URL = function() { - return '/v0/groups/{id}/members/$ref' + return '/v1/groups/{id}/members/$ref' } export const GroupsService_ListMembers_TYPE = function() { return 'get' @@ -596,7 +596,7 @@ export const GroupsService_ListMembers_TYPE = function() { export const GroupsService_ListMembersURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{id}/members/$ref' + let path = '/v1/groups/{id}/members/$ref' path = path.replace('{id}', `${parameters['id']}`) if (parameters['pageSize'] !== undefined) { queryParameters['page_size'] = parameters['pageSize'] @@ -625,12 +625,12 @@ export const GroupsService_ListMembersURL = function(parameters = {}) { * method: GroupsService_AddMember_TYPE * raw_url: GroupsService_AddMember_RAW_URL * @param id - The account id to add - * @param body - + * @param body - */ export const GroupsService_AddMember = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{id}/members/$ref' + let path = '/v1/groups/{id}/members/$ref' let body let queryParameters = {} let form = {} @@ -652,7 +652,7 @@ export const GroupsService_AddMember = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const GroupsService_AddMember_RAW_URL = function() { - return '/v0/groups/{id}/members/$ref' + return '/v1/groups/{id}/members/$ref' } export const GroupsService_AddMember_TYPE = function() { return 'post' @@ -660,7 +660,7 @@ export const GroupsService_AddMember_TYPE = function() { export const GroupsService_AddMemberURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{id}/members/$ref' + let path = '/v1/groups/{id}/members/$ref' path = path.replace('{id}', `${parameters['id']}`) if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { @@ -682,7 +682,7 @@ export const GroupsService_AddMemberURL = function(parameters = {}) { export const GroupsService_RemoveMember = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/v0/groups/{id}/members/{account_id}/$ref' + let path = '/v1/groups/{id}/members/{account_id}/$ref' let body let queryParameters = {} let form = {} @@ -702,7 +702,7 @@ export const GroupsService_RemoveMember = function(parameters = {}) { return request('delete', domain + path, body, queryParameters, form, config) } export const GroupsService_RemoveMember_RAW_URL = function() { - return '/v0/groups/{id}/members/{account_id}/$ref' + return '/v1/groups/{id}/members/{account_id}/$ref' } export const GroupsService_RemoveMember_TYPE = function() { return 'delete' @@ -710,7 +710,7 @@ export const GroupsService_RemoveMember_TYPE = function() { export const GroupsService_RemoveMemberURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/v0/groups/{id}/members/{account_id}/$ref' + let path = '/v1/groups/{id}/members/{account_id}/$ref' path = path.replace('{id}', `${parameters['id']}`) path = path.replace('{account_id}', `${parameters['accountId']}`) if (parameters.$queryParameters) { @@ -720,4 +720,4 @@ export const GroupsService_RemoveMemberURL = function(parameters = {}) { } let keys = Object.keys(queryParameters) return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') -} \ No newline at end of file +} diff --git a/glauth/pkg/command/server.go b/glauth/pkg/command/server.go index 75a27f8463c..9daaaff04cc 100644 --- a/glauth/pkg/command/server.go +++ b/glauth/pkg/command/server.go @@ -4,9 +4,10 @@ import ( "context" "fmt" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + glauthcfg "github.com/glauth/glauth/v2/pkg/config" "github.com/oklog/run" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/glauth/pkg/config" "github.com/owncloud/ocis/glauth/pkg/config/parser" "github.com/owncloud/ocis/glauth/pkg/logging" @@ -179,7 +180,7 @@ func Server(cfg *config.Config) *cli.Command { } // getAccountsServices returns an ocis-accounts service -func getAccountsServices() (accounts.AccountsService, accounts.GroupsService) { - return accounts.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient), - accounts.NewGroupsService("com.owncloud.api.accounts", grpc.DefaultClient) +func getAccountsServices() (accountssvc.AccountsService, accountssvc.GroupsService) { + return accountssvc.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient), + accountssvc.NewGroupsService("com.owncloud.api.accounts", grpc.DefaultClient) } diff --git a/glauth/pkg/server/glauth/ocis.go b/glauth/pkg/server/glauth/ocis.go index 2ea6270777f..ef1f3800da5 100644 --- a/glauth/pkg/server/glauth/ocis.go +++ b/glauth/pkg/server/glauth/ocis.go @@ -8,12 +8,14 @@ import ( "strconv" "strings" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/glauth/glauth/v2/pkg/config" "github.com/glauth/glauth/v2/pkg/handler" "github.com/glauth/glauth/v2/pkg/stats" ber "github.com/nmcclain/asn1-ber" "github.com/nmcclain/ldap" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "go-micro.dev/v4/metadata" @@ -27,8 +29,8 @@ const ( ) type ocisHandler struct { - as accounts.AccountsService - gs accounts.GroupsService + as accountssvc.AccountsService + gs accountssvc.GroupsService log log.Logger basedn string nameFormat string @@ -86,7 +88,7 @@ func (h ocisHandler) Bind(bindDN, bindSimplePw string, conn net.Conn) (ldap.LDAP ctx = metadata.Set(ctx, middleware.RoleIDs, string(roleIDs)) // check password - res, err := h.as.ListAccounts(ctx, &accounts.ListAccountsRequest{ + res, err := h.as.ListAccounts(ctx, &accountssvc.ListAccountsRequest{ //Query: fmt.Sprintf("username eq '%s'", username), // TODO this allows looking up users when you know the username using basic auth // adding the password to the query is an option but sending this over the wire a la scim seems ugly @@ -209,7 +211,7 @@ func (h ocisHandler) Search(bindDN string, searchReq ldap.SearchRequest, conn ne Msg("parsed query") switch qtype { case usersQuery: - accounts, err := h.as.ListAccounts(ctx, &accounts.ListAccountsRequest{ + accounts, err := h.as.ListAccounts(ctx, &accountssvc.ListAccountsRequest{ Query: query, }) if err != nil { @@ -229,7 +231,7 @@ func (h ocisHandler) Search(bindDN string, searchReq ldap.SearchRequest, conn ne } entries = append(entries, h.mapAccounts(accounts.Accounts)...) case groupsQuery: - groups, err := h.gs.ListGroups(ctx, &accounts.ListGroupsRequest{ + groups, err := h.gs.ListGroups(ctx, &accountssvc.ListGroupsRequest{ Query: query, }) if err != nil { @@ -275,7 +277,7 @@ func attribute(name string, values ...string) *ldap.EntryAttribute { } } -func (h ocisHandler) mapAccounts(accounts []*accounts.Account) []*ldap.Entry { +func (h ocisHandler) mapAccounts(accounts []*accountsmsg.Account) []*ldap.Entry { entries := make([]*ldap.Entry, 0, len(accounts)) for i := range accounts { attrs := []*ldap.EntryAttribute{ @@ -314,7 +316,7 @@ func (h ocisHandler) mapAccounts(accounts []*accounts.Account) []*ldap.Entry { return entries } -func (h ocisHandler) mapGroups(groups []*accounts.Group) []*ldap.Entry { +func (h ocisHandler) mapGroups(groups []*accountsmsg.Group) []*ldap.Entry { entries := make([]*ldap.Entry, 0, len(groups)) for i := range groups { attrs := []*ldap.EntryAttribute{ diff --git a/glauth/pkg/server/glauth/option.go b/glauth/pkg/server/glauth/option.go index 52ac71e4974..cf2f02d2c4a 100644 --- a/glauth/pkg/server/glauth/option.go +++ b/glauth/pkg/server/glauth/option.go @@ -3,8 +3,9 @@ package glauth import ( "context" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/glauth/glauth/v2/pkg/config" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" ) @@ -23,8 +24,8 @@ type Options struct { NameFormat string GroupFormat string RoleBundleUUID string - AccountsService accounts.AccountsService - GroupsService accounts.GroupsService + AccountsService accountssvc.AccountsService + GroupsService accountssvc.GroupsService } // newOptions initializes the available default options. @@ -102,14 +103,14 @@ func GroupFormat(val string) Option { } // AccountsService provides an AccountsService client to set the AccountsService option. -func AccountsService(val accounts.AccountsService) Option { +func AccountsService(val accountssvc.AccountsService) Option { return func(o *Options) { o.AccountsService = val } } // GroupsService provides an GroupsService client to set the GroupsService option. -func GroupsService(val accounts.GroupsService) Option { +func GroupsService(val accountssvc.GroupsService) Option { return func(o *Options) { o.GroupsService = val } diff --git a/ocs/pkg/service/v0/groups.go b/ocs/pkg/service/v0/groups.go index fd24e2b7bfa..e6764075795 100644 --- a/ocs/pkg/service/v0/groups.go +++ b/ocs/pkg/service/v0/groups.go @@ -9,9 +9,11 @@ import ( "regexp" "strconv" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + revactx "github.com/cs3org/reva/pkg/ctx" "github.com/go-chi/chi/v5" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocs/pkg/service/v0/data" "github.com/owncloud/ocis/ocs/pkg/service/v0/response" ocstracing "github.com/owncloud/ocis/ocs/pkg/tracing" @@ -26,7 +28,7 @@ func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request) { if err != nil { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account // short circuit if there is a user already in the context if u, ok := revactx.ContextGetUser(r.Context()); ok { @@ -50,7 +52,7 @@ func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request) { } if isValidUUID(userid) { - account, err = o.getAccountService().GetAccount(r.Context(), &accounts.GetAccountRequest{ + account, err = o.getAccountService().GetAccount(r.Context(), &accountssvc.GetAccountRequest{ Id: userid, }) } else { @@ -73,7 +75,7 @@ func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request) { if account.MemberOf[i].OnPremisesSamAccountName == "" { o.logger.Warn().Str("groupid", account.MemberOf[i].Id).Msg("group on_premises_sam_account_name is empty, trying to lookup by id") // we can try to look up the name - group, err := o.getGroupsService().GetGroup(r.Context(), &accounts.GetGroupRequest{ + group, err := o.getGroupsService().GetGroup(r.Context(), &accountssvc.GetGroupRequest{ Id: account.MemberOf[i].Id, }) @@ -139,7 +141,7 @@ func (o Ocs) AddToGroup(w http.ResponseWriter, r *http.Request) { return } - _, err = o.getGroupsService().AddMember(r.Context(), &accounts.AddMemberRequest{ + _, err = o.getGroupsService().AddMember(r.Context(), &accountssvc.AddMemberRequest{ AccountId: account.Id, GroupId: group.Id, }) @@ -192,10 +194,10 @@ func (o Ocs) RemoveFromGroup(w http.ResponseWriter, r *http.Request) { return } - var account *accounts.Account + var account *accountsmsg.Account if isValidUUID(userid) { - account, _ = o.getAccountService().GetAccount(r.Context(), &accounts.GetAccountRequest{ + account, _ = o.getAccountService().GetAccount(r.Context(), &accountssvc.GetAccountRequest{ Id: userid, }) } else { @@ -225,7 +227,7 @@ func (o Ocs) RemoveFromGroup(w http.ResponseWriter, r *http.Request) { return } - _, err = o.getGroupsService().RemoveMember(r.Context(), &accounts.RemoveMemberRequest{ + _, err = o.getGroupsService().RemoveMember(r.Context(), &accountssvc.RemoveMemberRequest{ AccountId: account.Id, GroupId: group.Id, }) @@ -253,7 +255,7 @@ func (o Ocs) ListGroups(w http.ResponseWriter, r *http.Request) { query = fmt.Sprintf("id eq '%s' or on_premises_sam_account_name eq '%s'", escapeValue(search), escapeValue(search)) } - res, err := o.getGroupsService().ListGroups(r.Context(), &accounts.ListGroupsRequest{ + res, err := o.getGroupsService().ListGroups(r.Context(), &accountssvc.ListGroupsRequest{ Query: query, }) @@ -312,13 +314,13 @@ func (o Ocs) AddGroup(w http.ResponseWriter, r *http.Request) { } } - newGroup := &accounts.Group{ + newGroup := &accountsmsg.Group{ Id: groupid, DisplayName: displayname, OnPremisesSamAccountName: groupid, GidNumber: gidNumber, } - group, err := o.getGroupsService().CreateGroup(r.Context(), &accounts.CreateGroupRequest{ + group, err := o.getGroupsService().CreateGroup(r.Context(), &accountssvc.CreateGroupRequest{ Group: newGroup, }) if err != nil { @@ -366,7 +368,7 @@ func (o Ocs) DeleteGroup(w http.ResponseWriter, r *http.Request) { return } - _, err = o.getGroupsService().DeleteGroup(r.Context(), &accounts.DeleteGroupRequest{ + _, err = o.getGroupsService().DeleteGroup(r.Context(), &accountssvc.DeleteGroupRequest{ Id: group.Id, }) @@ -406,7 +408,7 @@ func (o Ocs) GetGroupMembers(w http.ResponseWriter, r *http.Request) { return } - res, err := o.getGroupsService().ListMembers(r.Context(), &accounts.ListMembersRequest{Id: group.Id}) + res, err := o.getGroupsService().ListMembers(r.Context(), &accountssvc.ListMembersRequest{Id: group.Id}) if err != nil { merr := merrors.FromError(err) @@ -433,9 +435,9 @@ func isValidUUID(uuid string) bool { return r.MatchString(uuid) } -func (o Ocs) fetchGroupByName(ctx context.Context, name string) (*accounts.Group, error) { - var res *accounts.ListGroupsResponse - res, err := o.getGroupsService().ListGroups(ctx, &accounts.ListGroupsRequest{ +func (o Ocs) fetchGroupByName(ctx context.Context, name string) (*accountsmsg.Group, error) { + var res *accountssvc.ListGroupsResponse + res, err := o.getGroupsService().ListGroups(ctx, &accountssvc.ListGroupsRequest{ Query: fmt.Sprintf("on_premises_sam_account_name eq '%v'", escapeValue(name)), }) if err != nil { diff --git a/ocs/pkg/service/v0/service.go b/ocs/pkg/service/v0/service.go index 07a69f0113b..5a20171daf9 100644 --- a/ocs/pkg/service/v0/service.go +++ b/ocs/pkg/service/v0/service.go @@ -11,7 +11,8 @@ import ( "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/render" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/owncloud/ocis/ocis-pkg/account" "github.com/owncloud/ocis/ocis-pkg/log" opkgm "github.com/owncloud/ocis/ocis-pkg/middleware" @@ -158,8 +159,8 @@ func (o Ocs) NotFound(w http.ResponseWriter, r *http.Request) { o.mustRender(w, r, response.ErrRender(data.MetaNotFound.StatusCode, "not found")) } -func (o Ocs) getAccountService() accounts.AccountsService { - return accounts.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient) +func (o Ocs) getAccountService() accountssvc.AccountsService { + return accountssvc.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient) } func (o Ocs) getCS3Backend() backend.UserBackend { @@ -170,8 +171,8 @@ func (o Ocs) getCS3Backend() backend.UserBackend { return backend.NewCS3UserBackend(nil, revaClient, o.config.MachineAuthAPIKey, o.logger) } -func (o Ocs) getGroupsService() accounts.GroupsService { - return accounts.NewGroupsService("com.owncloud.api.accounts", grpc.DefaultClient) +func (o Ocs) getGroupsService() accountssvc.GroupsService { + return accountssvc.NewGroupsService("com.owncloud.api.accounts", grpc.DefaultClient) } // NotImplementedStub returns a not implemented error diff --git a/ocs/pkg/service/v0/users.go b/ocs/pkg/service/v0/users.go index 8010b10a2d8..256109a41a3 100644 --- a/ocs/pkg/service/v0/users.go +++ b/ocs/pkg/service/v0/users.go @@ -10,6 +10,9 @@ import ( "strconv" "strings" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/asim/go-micro/plugins/client/grpc/v4" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" @@ -21,7 +24,6 @@ import ( "github.com/cs3org/reva/pkg/token/manager/jwt" "github.com/go-chi/chi/v5" "github.com/google/uuid" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocs/pkg/service/v0/data" "github.com/owncloud/ocis/ocs/pkg/service/v0/response" ocstracing "github.com/owncloud/ocis/ocs/pkg/tracing" @@ -35,7 +37,7 @@ import ( // GetSelf returns the currently logged in user func (o Ocs) GetSelf(w http.ResponseWriter, r *http.Request) { - var account *accounts.Account + var account *accountsmsg.Account var err error u, ok := revactx.ContextGetUser(r.Context()) if !ok || u.Id == nil || u.Id.OpaqueId == "" { @@ -43,7 +45,7 @@ func (o Ocs) GetSelf(w http.ResponseWriter, r *http.Request) { return } - account, err = o.getAccountService().GetAccount(r.Context(), &accounts.GetAccountRequest{ + account, err = o.getAccountService().GetAccount(r.Context(), &accountssvc.GetAccountRequest{ Id: u.Id.OpaqueId, }) @@ -92,7 +94,7 @@ func (o Ocs) GetUser(w http.ResponseWriter, r *http.Request) { if err != nil { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account switch { case userid == "": @@ -198,12 +200,12 @@ func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request) { displayname = userid } - newAccount := &accounts.Account{ + newAccount := &accountsmsg.Account{ Id: uuid.New().String(), DisplayName: displayname, PreferredName: userid, OnPremisesSamAccountName: userid, - PasswordProfile: &accounts.PasswordProfile{ + PasswordProfile: &accountsmsg.PasswordProfile{ Password: password, }, Mail: email, @@ -218,11 +220,11 @@ func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request) { newAccount.GidNumber = gidNumber } - var account *accounts.Account + var account *accountsmsg.Account switch o.config.AccountBackend { case "accounts": - account, err = o.getAccountService().CreateAccount(r.Context(), &accounts.CreateAccountRequest{ + account, err = o.getAccountService().CreateAccount(r.Context(), &accountssvc.CreateAccountRequest{ Account: newAccount, }) case "cs3": @@ -284,7 +286,7 @@ func (o Ocs) EditUser(w http.ResponseWriter, r *http.Request) { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account switch o.config.AccountBackend { case "accounts": account, err = o.fetchAccountByUsername(r.Context(), userid) @@ -305,8 +307,8 @@ func (o Ocs) EditUser(w http.ResponseWriter, r *http.Request) { return } - req := accounts.UpdateAccountRequest{ - Account: &accounts.Account{ + req := accountssvc.UpdateAccountRequest{ + Account: &accountsmsg.Account{ Id: account.Id, }, } @@ -322,7 +324,7 @@ func (o Ocs) EditUser(w http.ResponseWriter, r *http.Request) { req.Account.OnPremisesSamAccountName = value req.UpdateMask = &fieldmaskpb.FieldMask{Paths: []string{"PreferredName", "OnPremisesSamAccountName"}} case "password": - req.Account.PasswordProfile = &accounts.PasswordProfile{ + req.Account.PasswordProfile = &accountsmsg.PasswordProfile{ Password: value, } req.UpdateMask = &fieldmaskpb.FieldMask{Paths: []string{"PasswordProfile.Password"}} @@ -365,7 +367,7 @@ func (o Ocs) DeleteUser(w http.ResponseWriter, r *http.Request) { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account switch o.config.AccountBackend { case "accounts": account, err = o.fetchAccountByUsername(r.Context(), userid) @@ -486,7 +488,7 @@ func (o Ocs) DeleteUser(w http.ResponseWriter, r *http.Request) { } } - req := accounts.DeleteAccountRequest{ + req := accountssvc.DeleteAccountRequest{ Id: account.Id, } @@ -507,7 +509,7 @@ func (o Ocs) DeleteUser(w http.ResponseWriter, r *http.Request) { } // TODO(refs) this to ocis-pkg ... we are minting tokens all over the place ... or use a service? ... like reva? -func (o Ocs) mintTokenForUser(ctx context.Context, account *accounts.Account) (string, error) { +func (o Ocs) mintTokenForUser(ctx context.Context, account *accountsmsg.Account) (string, error) { tm, _ := jwt.New(map[string]interface{}{ "secret": o.config.TokenManager.JWTSecret, "expires": int64(24 * 60 * 60), @@ -537,7 +539,7 @@ func (o Ocs) EnableUser(w http.ResponseWriter, r *http.Request) { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account switch o.config.AccountBackend { case "accounts": account, err = o.fetchAccountByUsername(r.Context(), userid) @@ -560,7 +562,7 @@ func (o Ocs) EnableUser(w http.ResponseWriter, r *http.Request) { account.AccountEnabled = true - req := accounts.UpdateAccountRequest{ + req := accountssvc.UpdateAccountRequest{ Account: account, UpdateMask: &field_mask.FieldMask{ Paths: []string{"AccountEnabled"}, @@ -591,7 +593,7 @@ func (o Ocs) DisableUser(w http.ResponseWriter, r *http.Request) { o.mustRender(w, r, response.ErrRender(data.MetaServerError.StatusCode, err.Error())) } - var account *accounts.Account + var account *accountsmsg.Account switch o.config.AccountBackend { case "accounts": account, err = o.fetchAccountByUsername(r.Context(), userid) @@ -614,7 +616,7 @@ func (o Ocs) DisableUser(w http.ResponseWriter, r *http.Request) { account.AccountEnabled = false - req := accounts.UpdateAccountRequest{ + req := accountssvc.UpdateAccountRequest{ Account: account, UpdateMask: &field_mask.FieldMask{ Paths: []string{"AccountEnabled"}, @@ -717,11 +719,11 @@ func (o Ocs) ListUsers(w http.ResponseWriter, r *http.Request) { query = fmt.Sprintf("on_premises_sam_account_name eq '%s'", escapeValue(search)) } - var res *accounts.ListAccountsResponse + var res *accountssvc.ListAccountsResponse var err error switch o.config.AccountBackend { case "accounts": - res, err = o.getAccountService().ListAccounts(r.Context(), &accounts.ListAccountsRequest{ + res, err = o.getAccountService().ListAccounts(r.Context(), &accountssvc.ListAccountsRequest{ Query: query, }) case "cs3": @@ -750,9 +752,9 @@ func escapeValue(value string) string { return strings.ReplaceAll(value, "'", "''") } -func (o Ocs) fetchAccountByUsername(ctx context.Context, name string) (*accounts.Account, error) { - var res *accounts.ListAccountsResponse - res, err := o.getAccountService().ListAccounts(ctx, &accounts.ListAccountsRequest{ +func (o Ocs) fetchAccountByUsername(ctx context.Context, name string) (*accountsmsg.Account, error) { + var res *accountssvc.ListAccountsResponse + res, err := o.getAccountService().ListAccounts(ctx, &accountssvc.ListAccountsRequest{ Query: fmt.Sprintf("on_premises_sam_account_name eq '%v'", escapeValue(name)), }) if err != nil { @@ -764,13 +766,13 @@ func (o Ocs) fetchAccountByUsername(ctx context.Context, name string) (*accounts return nil, merrors.NotFound("", data.MessageUserNotFound) } -func (o Ocs) fetchAccountFromCS3Backend(ctx context.Context, name string) (*accounts.Account, error) { +func (o Ocs) fetchAccountFromCS3Backend(ctx context.Context, name string) (*accountsmsg.Account, error) { backend := o.getCS3Backend() u, _, err := backend.GetUserByClaims(ctx, "username", name, false) if err != nil { return nil, err } - return &accounts.Account{ + return &accountsmsg.Account{ OnPremisesSamAccountName: u.Username, DisplayName: u.DisplayName, Mail: u.Mail, diff --git a/proxy/pkg/command/server.go b/proxy/pkg/command/server.go index 7f1767ae2c2..7ed603614be 100644 --- a/proxy/pkg/command/server.go +++ b/proxy/pkg/command/server.go @@ -7,12 +7,13 @@ import ( "net/http" "time" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/coreos/go-oidc/v3/oidc" "github.com/cs3org/reva/pkg/token/manager/jwt" chimiddleware "github.com/go-chi/chi/v5/middleware" "github.com/justinas/alice" "github.com/oklog/run" - acc "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" pkgmiddleware "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/grpc" @@ -139,7 +140,7 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config) Msg("Failed to create token manager") } userProvider = backend.NewAccountsServiceUserBackend( - acc.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient), + accountssvc.NewAccountsService("com.owncloud.api.accounts", grpc.DefaultClient), rolesClient, cfg.OIDC.Issuer, tokenManager, diff --git a/proxy/pkg/config/defaultconfig.go b/proxy/pkg/config/defaultconfig.go index 12bcbe806d6..a5b1611e390 100644 --- a/proxy/pkg/config/defaultconfig.go +++ b/proxy/pkg/config/defaultconfig.go @@ -132,7 +132,7 @@ func DefaultPolicies() []Policy { }, // if we were using the go micro api gateway we could look up the endpoint in the registry dynamically { - Endpoint: "/api/v0/accounts", + Endpoint: "/api/v1/accounts", Backend: "http://localhost:9181", }, // TODO the lookup needs a better mechanism diff --git a/proxy/pkg/middleware/options.go b/proxy/pkg/middleware/options.go index f9b7afd787a..0ef5f86d844 100644 --- a/proxy/pkg/middleware/options.go +++ b/proxy/pkg/middleware/options.go @@ -8,8 +8,9 @@ import ( settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" - acc "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/proxy/pkg/config" storepb "github.com/owncloud/ocis/store/pkg/proto/v0" @@ -29,7 +30,7 @@ type Options struct { // HTTPClient to use for communication with the oidcAuth provider HTTPClient *http.Client // AccountsClient for resolving accounts - AccountsClient acc.AccountsService + AccountsClient accountssvc.AccountsService // UP UserProvider backend.UserBackend // SettingsRoleService for the roles API in settings @@ -100,7 +101,7 @@ func HTTPClient(c *http.Client) Option { } // AccountsClient provides a function to set the accounts client config option. -func AccountsClient(ac acc.AccountsService) Option { +func AccountsClient(ac accountssvc.AccountsService) Option { return func(o *Options) { o.AccountsClient = ac } diff --git a/proxy/pkg/proxy/policy/selector.go b/proxy/pkg/proxy/policy/selector.go index 7f1638e938e..963f5df0015 100644 --- a/proxy/pkg/proxy/policy/selector.go +++ b/proxy/pkg/proxy/policy/selector.go @@ -6,9 +6,10 @@ import ( "regexp" "sort" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + "github.com/asim/go-micro/plugins/client/grpc/v4" revactx "github.com/cs3org/reva/pkg/ctx" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/oidc" "github.com/owncloud/ocis/proxy/pkg/config" ) @@ -84,7 +85,7 @@ func LoadSelector(cfg *config.PolicySelector) (Selector, error) { if cfg.Migration != nil { return NewMigrationSelector( cfg.Migration, - accounts.NewAccountsService("com.owncloud.accounts", grpc.NewClient())), nil + accountssvc.NewAccountsService("com.owncloud.accounts", grpc.NewClient())), nil } if cfg.Claims != nil { @@ -129,7 +130,7 @@ func NewStaticSelector(cfg *config.StaticSelectorConf) Selector { // // This selector can be used in migration-scenarios where some users have already migrated from ownCloud10 to OCIS and // thus have an entry in ocis-accounts. All users without accounts entry are routed to the legacy ownCloud10 instance. -func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.AccountsService) Selector { +func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accountssvc.AccountsService) Selector { var acc = ss return func(r *http.Request) (s string, err error) { var claims map[string]interface{} @@ -144,7 +145,7 @@ func NewMigrationSelector(cfg *config.MigrationSelectorConf, ss accounts.Account return cfg.AccNotFoundPolicy, nil } - if _, err := acc.GetAccount(r.Context(), &accounts.GetAccountRequest{Id: userID}); err != nil { + if _, err := acc.GetAccount(r.Context(), &accountssvc.GetAccountRequest{Id: userID}); err != nil { return cfg.AccNotFoundPolicy, nil } return cfg.AccFoundPolicy, nil diff --git a/proxy/pkg/user/backend/accounts.go b/proxy/pkg/user/backend/accounts.go index 1c9fd0b833c..7142364ef8b 100644 --- a/proxy/pkg/user/backend/accounts.go +++ b/proxy/pkg/user/backend/accounts.go @@ -6,18 +6,20 @@ import ( "net/http" "strings" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/cs3org/reva/pkg/auth/scope" "github.com/cs3org/reva/pkg/token" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" settings "github.com/owncloud/ocis/settings/pkg/proto/v0" ) // NewAccountsServiceUserBackend creates a user-provider which fetches users from the ocis accounts-service -func NewAccountsServiceUserBackend(ac accounts.AccountsService, rs settings.RoleService, oidcISS string, tokenManager token.Manager, logger log.Logger) UserBackend { +func NewAccountsServiceUserBackend(ac accountssvc.AccountsService, rs settings.RoleService, oidcISS string, tokenManager token.Manager, logger log.Logger) UserBackend { return &accountsServiceBackend{ accountsClient: ac, settingsRoleService: rs, @@ -28,7 +30,7 @@ func NewAccountsServiceUserBackend(ac accounts.AccountsService, rs settings.Role } type accountsServiceBackend struct { - accountsClient accounts.AccountsService + accountsClient accountssvc.AccountsService settingsRoleService settings.RoleService OIDCIss string logger log.Logger @@ -36,7 +38,7 @@ type accountsServiceBackend struct { } func (a accountsServiceBackend) GetUserByClaims(ctx context.Context, claim, value string, withRoles bool) (*cs3.User, string, error) { - var account *accounts.Account + var account *accountsmsg.Account var status int var query string @@ -109,8 +111,8 @@ func (a *accountsServiceBackend) Authenticate(ctx context.Context, username stri } func (a accountsServiceBackend) CreateUserFromClaims(ctx context.Context, claims map[string]interface{}) (*cs3.User, error) { - req := &accounts.CreateAccountRequest{ - Account: &accounts.Account{ + req := &accountssvc.CreateAccountRequest{ + Account: &accountsmsg.Account{ CreationType: "LocalAccount", AccountEnabled: true, }, @@ -155,7 +157,7 @@ func (a accountsServiceBackend) GetUserGroups(ctx context.Context, userID string // accountToUser converts an owncloud account struct to a reva user struct. In the proxy // we work with the reva struct as a token can be minted from it. -func (a *accountsServiceBackend) accountToUser(account *accounts.Account) *cs3.User { +func (a *accountsServiceBackend) accountToUser(account *accountsmsg.Account) *cs3.User { user := &cs3.User{ Id: &cs3.UserId{ OpaqueId: account.Id, @@ -173,8 +175,8 @@ func (a *accountsServiceBackend) accountToUser(account *accounts.Account) *cs3.U return user } -func (a *accountsServiceBackend) getAccount(ctx context.Context, query string) (account *accounts.Account, status int) { - resp, err := a.accountsClient.ListAccounts(ctx, &accounts.ListAccountsRequest{ +func (a *accountsServiceBackend) getAccount(ctx context.Context, query string) (account *accountsmsg.Account, status int) { + resp, err := a.accountsClient.ListAccounts(ctx, &accountssvc.ListAccountsRequest{ Query: query, PageSize: 2, }) @@ -216,7 +218,7 @@ func (a *accountsServiceBackend) generateToken(ctx context.Context, u *cs3.User) return token, nil } -func expandGroups(account *accounts.Account) []string { +func expandGroups(account *accountsmsg.Account) []string { groups := make([]string, len(account.MemberOf)) for i := range account.MemberOf { // reva needs the unix group name From 652bc1657c8d640f79bc4d74b9ea14f3347f1fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 15 Dec 2021 19:10:35 +0100 Subject: [PATCH 03/20] Remove all proto files for the accounts --- accounts/pkg/proto/v0/accounts.mock.go | 89 - accounts/pkg/proto/v0/accounts.pb.go | 2842 ----------------- accounts/pkg/proto/v0/accounts.pb.micro.go | 622 ---- .../pkg/proto/v0/accounts.pb.micro_test.go | 1317 -------- accounts/pkg/proto/v0/accounts.pb.web.go | 1217 ------- accounts/pkg/proto/v0/accounts.swagger.json | 1067 ------- accounts/proto/v0/accounts.proto | 697 ---- 7 files changed, 7851 deletions(-) delete mode 100644 accounts/pkg/proto/v0/accounts.mock.go delete mode 100644 accounts/pkg/proto/v0/accounts.pb.go delete mode 100644 accounts/pkg/proto/v0/accounts.pb.micro.go delete mode 100644 accounts/pkg/proto/v0/accounts.pb.micro_test.go delete mode 100644 accounts/pkg/proto/v0/accounts.pb.web.go delete mode 100644 accounts/pkg/proto/v0/accounts.swagger.json delete mode 100644 accounts/proto/v0/accounts.proto diff --git a/accounts/pkg/proto/v0/accounts.mock.go b/accounts/pkg/proto/v0/accounts.mock.go deleted file mode 100644 index a11b4931320..00000000000 --- a/accounts/pkg/proto/v0/accounts.mock.go +++ /dev/null @@ -1,89 +0,0 @@ -package proto - -import ( - context "context" - - client "go-micro.dev/v4/client" - empty "google.golang.org/protobuf/types/known/emptypb" -) - -// MockAccountsService can be used to write tests -/* -To create a mock overwrite the functions of an instance like this: - -```go -func mockAccSvc(retErr bool) proto.AccountsService { - if retErr { - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return nil, fmt.Errorf("error returned by mockAccountsService LIST") - }, - } - } - - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return &proto.ListAccountsResponse{ - Accounts: []*proto.Account{ - { - Id: "yay", - }, - }, - }, nil - }, - } -} -``` -*/ -type MockAccountsService struct { - ListFunc func(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) - GetFunc func(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) - CreateFunc func(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) - UpdateFunc func(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) - DeleteFunc func(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) -} - -// ListAccounts will panic if the function has been called, but not mocked -func (m MockAccountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { - if m.ListFunc != nil { - return m.ListFunc(ctx, in, opts...) - } - - panic("ListFunc was called in test but not mocked") -} - -// GetAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.GetFunc != nil { - return m.GetFunc(ctx, in, opts...) - } - - panic("GetFunc was called in test but not mocked") -} - -// CreateAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.CreateFunc != nil { - return m.CreateFunc(ctx, in, opts...) - } - - panic("CreateFunc was called in test but not mocked") -} - -// UpdateAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.UpdateFunc != nil { - return m.UpdateFunc(ctx, in, opts...) - } - - panic("UpdateFunc was called in test but not mocked") -} - -// DeleteAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { - if m.DeleteFunc != nil { - return m.DeleteFunc(ctx, in, opts...) - } - - panic("DeleteFunc was called in test but not mocked") -} diff --git a/accounts/pkg/proto/v0/accounts.pb.go b/accounts/pkg/proto/v0/accounts.pb.go deleted file mode 100644 index fd1a391732c..00000000000 --- a/accounts/pkg/proto/v0/accounts.pb.go +++ /dev/null @@ -1,2842 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 -// source: proto/v0/accounts.proto - -package proto - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - 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) -) - -type RebuildIndexRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RebuildIndexRequest) Reset() { - *x = RebuildIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RebuildIndexRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RebuildIndexRequest) ProtoMessage() {} - -func (x *RebuildIndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 RebuildIndexRequest.ProtoReflect.Descriptor instead. -func (*RebuildIndexRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{0} -} - -type RebuildIndexResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RebuildIndexResponse) Reset() { - *x = RebuildIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RebuildIndexResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RebuildIndexResponse) ProtoMessage() {} - -func (x *RebuildIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 RebuildIndexResponse.ProtoReflect.Descriptor instead. -func (*RebuildIndexResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{1} -} - -type ListAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The maximum number of accounts to return in the response - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the accounts to return. - // If no search criteria is specified then all accounts will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `email=foo@example.com` returns accounts with - // `email` set to `foo@example.com` - // * Query `display_name=\\"Test String\\"` returns accounts with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *ListAccountsRequest) Reset() { - *x = ListAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsRequest) ProtoMessage() {} - -func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 ListAccountsRequest.ProtoReflect.Descriptor instead. -func (*ListAccountsRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{2} -} - -func (x *ListAccountsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListAccountsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListAccountsRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListAccountsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -type ListAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "accounts" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListAccountsResponse) Reset() { - *x = ListAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsResponse) ProtoMessage() {} - -func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 ListAccountsResponse.ProtoReflect.Descriptor instead. -func (*ListAccountsResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{3} -} - -func (x *ListAccountsResponse) GetAccounts() []*Account { - if x != nil { - return x.Accounts - } - return nil -} - -func (x *ListAccountsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type GetAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetAccountRequest) Reset() { - *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountRequest) ProtoMessage() {} - -func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 GetAccountRequest.ProtoReflect.Descriptor instead. -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{4} -} - -func (x *GetAccountRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type CreateAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource to create - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *CreateAccountRequest) Reset() { - *x = CreateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateAccountRequest) ProtoMessage() {} - -func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 CreateAccountRequest.ProtoReflect.Descriptor instead. -func (*CreateAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateAccountRequest) GetAccount() *Account { - if x != nil { - return x.Account - } - return nil -} - -type UpdateAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource which replaces the resource on the server - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateAccountRequest) Reset() { - *x = UpdateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateAccountRequest) ProtoMessage() {} - -func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 UpdateAccountRequest.ProtoReflect.Descriptor instead. -func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateAccountRequest) GetAccount() *Account { - if x != nil { - return x.Account - } - return nil -} - -func (x *UpdateAccountRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -type DeleteAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteAccountRequest) Reset() { - *x = DeleteAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountRequest) ProtoMessage() {} - -func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 DeleteAccountRequest.ProtoReflect.Descriptor instead. -func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteAccountRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// Account follows the properties of the ms graph api user resource. -// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties -type Account struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. - AccountEnabled bool `protobuf:"varint,2,opt,name=account_enabled,json=accountEnabled,proto3" json:"account_enabled,omitempty"` - // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. - // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. - // You could give printers or machines with a sync client resource accounts as well. - // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. - IsResourceAccount bool `protobuf:"varint,3,opt,name=is_resource_account,json=isResourceAccount,proto3" json:"is_resource_account,omitempty"` - // Indicates whether the account was created as - // - a regular school or work account ("" / emptystring), - // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - // - an external account (Invitation), - // - self-service sign-up using email verification (EmailVerified). Read-only. - CreationType string `protobuf:"bytes,4,opt,name=creation_type,json=creationType,proto3" json:"creation_type,omitempty"` - // Represents the identities that can be used to sign in to this account. - // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. - // May contain multiple items with the same signInType value. Supports $filter. - Identities []*Identities `protobuf:"bytes,5,rep,name=identities,proto3" json:"identities,omitempty"` - // The name displayed in the address book for the account. - // This is usually the combination of the user's first name, middle initial and last name. - // This property is required when a user is created and it cannot be cleared during updates. - // Supports $filter and $orderby. - // posixaccount MUST cn - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // The username - // posixaccount MUST uid - PreferredName string `protobuf:"bytes,7,opt,name=preferred_name,json=preferredName,proto3" json:"preferred_name,omitempty"` - // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users - // used for exposing the user using ldap - // posixaccount MUST uidnumber - UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"` - // used for exposing the user using ldap - // posixaccount MUST gidnumber - GidNumber int64 `protobuf:"varint,9,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` - // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. - // inetorgperson MAY mail - Mail string `protobuf:"bytes,10,opt,name=mail,proto3" json:"mail,omitempty"` - // A description, useful for resource accounts - // posixaccount MAY description - Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` - // Specifies the password profile for the user. - // The profile contains the user’s password. This property is required when a user is created. - // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. - // By default, a strong password is required. - // posixaccount MAY authPassword - PasswordProfile *PasswordProfile `protobuf:"bytes,12,opt,name=password_profile,json=passwordProfile,proto3" json:"password_profile,omitempty"` - // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. - // should we only respond with repeated strings of ids? no clients should a proper filter mask! - MemberOf []*Group `protobuf:"bytes,13,rep,name=memberOf,proto3" json:"memberOf,omitempty"` - // The created date of the account object. - CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` - // The date and time the user was deleted. Returned only on $select. - DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). Read-only - OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` - // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. - OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` - // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` - // Contains the on-premises userPrincipalName synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesUserPrincipalName string `protobuf:"bytes,26,opt,name=on_premises_user_principal_name,json=onPremisesUserPrincipalName,proto3" json:"on_premises_user_principal_name,omitempty"` - // Indicates the last time at which the object was synced with the on-premises directory; Read-only. - OnPremisesLastSyncDateTime *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` - // Errors when using synchronization during provisioning. - OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,29,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` - // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. - // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. - // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. - ExternalUserState string `protobuf:"bytes,40,opt,name=external_user_state,json=externalUserState,proto3" json:"external_user_state,omitempty"` - // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. - ExternalUserStateChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,41,opt,name=external_user_state_change_date_time,json=externalUserStateChangeDateTime,proto3" json:"external_user_state_change_date_time,omitempty"` - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. - RefreshTokensValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=refresh_tokens_valid_from_date_time,json=refreshTokensValidFromDateTime,proto3" json:"refresh_tokens_valid_from_date_time,omitempty"` - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Read-only. Use revokeSignInSessions to reset. - SignInSessionsValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,61,opt,name=sign_in_sessions_valid_from_date_time,json=signInSessionsValidFromDateTime,proto3" json:"sign_in_sessions_valid_from_date_time,omitempty"` -} - -func (x *Account) Reset() { - *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Account) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Account) ProtoMessage() {} - -func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 Account.ProtoReflect.Descriptor instead. -func (*Account) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{8} -} - -func (x *Account) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Account) GetAccountEnabled() bool { - if x != nil { - return x.AccountEnabled - } - return false -} - -func (x *Account) GetIsResourceAccount() bool { - if x != nil { - return x.IsResourceAccount - } - return false -} - -func (x *Account) GetCreationType() string { - if x != nil { - return x.CreationType - } - return "" -} - -func (x *Account) GetIdentities() []*Identities { - if x != nil { - return x.Identities - } - return nil -} - -func (x *Account) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Account) GetPreferredName() string { - if x != nil { - return x.PreferredName - } - return "" -} - -func (x *Account) GetUidNumber() int64 { - if x != nil { - return x.UidNumber - } - return 0 -} - -func (x *Account) GetGidNumber() int64 { - if x != nil { - return x.GidNumber - } - return 0 -} - -func (x *Account) GetMail() string { - if x != nil { - return x.Mail - } - return "" -} - -func (x *Account) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Account) GetPasswordProfile() *PasswordProfile { - if x != nil { - return x.PasswordProfile - } - return nil -} - -func (x *Account) GetMemberOf() []*Group { - if x != nil { - return x.MemberOf - } - return nil -} - -func (x *Account) GetCreatedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreatedDateTime - } - return nil -} - -func (x *Account) GetDeletedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.DeletedDateTime - } - return nil -} - -func (x *Account) GetOnPremisesSyncEnabled() bool { - if x != nil { - return x.OnPremisesSyncEnabled - } - return false -} - -func (x *Account) GetOnPremisesImmutableId() string { - if x != nil { - return x.OnPremisesImmutableId - } - return "" -} - -func (x *Account) GetOnPremisesSecurityIdentifier() string { - if x != nil { - return x.OnPremisesSecurityIdentifier - } - return "" -} - -func (x *Account) GetOnPremisesDistinguishedName() string { - if x != nil { - return x.OnPremisesDistinguishedName - } - return "" -} - -func (x *Account) GetOnPremisesSamAccountName() string { - if x != nil { - return x.OnPremisesSamAccountName - } - return "" -} - -func (x *Account) GetOnPremisesDomainName() string { - if x != nil { - return x.OnPremisesDomainName - } - return "" -} - -func (x *Account) GetOnPremisesUserPrincipalName() string { - if x != nil { - return x.OnPremisesUserPrincipalName - } - return "" -} - -func (x *Account) GetOnPremisesLastSyncDateTime() *timestamppb.Timestamp { - if x != nil { - return x.OnPremisesLastSyncDateTime - } - return nil -} - -func (x *Account) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { - if x != nil { - return x.OnPremisesProvisioningErrors - } - return nil -} - -func (x *Account) GetExternalUserState() string { - if x != nil { - return x.ExternalUserState - } - return "" -} - -func (x *Account) GetExternalUserStateChangeDateTime() *timestamppb.Timestamp { - if x != nil { - return x.ExternalUserStateChangeDateTime - } - return nil -} - -func (x *Account) GetRefreshTokensValidFromDateTime() *timestamppb.Timestamp { - if x != nil { - return x.RefreshTokensValidFromDateTime - } - return nil -} - -func (x *Account) GetSignInSessionsValidFromDateTime() *timestamppb.Timestamp { - if x != nil { - return x.SignInSessionsValidFromDateTime - } - return nil -} - -// Identities Represents an identity used to sign in to a user account. -// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. -// This enables the user to sign in to the user account with any of those associated identities. -// They are also used to keep a history of old usernames. -type Identities struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. - // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. - // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. - // This property can also be set to any custom string. - SignInType string `protobuf:"bytes,1,opt,name=sign_in_type,json=signInType,proto3" json:"sign_in_type,omitempty"` - // Specifies the issuer of the identity, for example facebook.com. - // For local accounts (where signInType is not federated), this property is - // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. - // For external users from other Azure AD organization, this will be the domain of - // the federated organization, for example contoso.com. - // Supports $filter. 512 character limit. - Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` - // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). - // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address - // * `userName`, issuer_assigned_id must be a valid local part of an email address - // Supports $filter. 512 character limit. - IssuerAssignedId string `protobuf:"bytes,3,opt,name=issuer_assigned_id,json=issuerAssignedId,proto3" json:"issuer_assigned_id,omitempty"` -} - -func (x *Identities) Reset() { - *x = Identities{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identities) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identities) ProtoMessage() {} - -func (x *Identities) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 Identities.ProtoReflect.Descriptor instead. -func (*Identities) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{9} -} - -func (x *Identities) GetSignInType() string { - if x != nil { - return x.SignInType - } - return "" -} - -func (x *Identities) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *Identities) GetIssuerAssignedId() string { - if x != nil { - return x.IssuerAssignedId - } - return "" -} - -type PasswordProfile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The password for the user. This property is required when a user is created. - // It can be updated, but the user will be required to change the password on the next login. - // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - // The time when this account last changed their password. - LastPasswordChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_password_change_date_time,json=lastPasswordChangeDateTime,proto3" json:"last_password_change_date_time,omitempty"` - // Specifies password policies for the user. - //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. - // “DisablePasswordExpiration” can also be specified. - PasswordPolicies []string `protobuf:"bytes,3,rep,name=password_policies,json=passwordPolicies,proto3" json:"password_policies,omitempty"` - // *true* if the user must change her password on the next login; otherwise false. - ForceChangePasswordNextSignIn bool `protobuf:"varint,4,opt,name=force_change_password_next_sign_in,json=forceChangePasswordNextSignIn,proto3" json:"force_change_password_next_sign_in,omitempty"` - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - ForceChangePasswordNextSignInWithMfa bool `protobuf:"varint,5,opt,name=force_change_password_next_sign_in_with_mfa,json=forceChangePasswordNextSignInWithMfa,proto3" json:"force_change_password_next_sign_in_with_mfa,omitempty"` -} - -func (x *PasswordProfile) Reset() { - *x = PasswordProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PasswordProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PasswordProfile) ProtoMessage() {} - -func (x *PasswordProfile) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 PasswordProfile.ProtoReflect.Descriptor instead. -func (*PasswordProfile) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{10} -} - -func (x *PasswordProfile) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *PasswordProfile) GetLastPasswordChangeDateTime() *timestamppb.Timestamp { - if x != nil { - return x.LastPasswordChangeDateTime - } - return nil -} - -func (x *PasswordProfile) GetPasswordPolicies() []string { - if x != nil { - return x.PasswordPolicies - } - return nil -} - -func (x *PasswordProfile) GetForceChangePasswordNextSignIn() bool { - if x != nil { - return x.ForceChangePasswordNextSignIn - } - return false -} - -func (x *PasswordProfile) GetForceChangePasswordNextSignInWithMfa() bool { - if x != nil { - return x.ForceChangePasswordNextSignInWithMfa - } - return false -} - -type ListGroupsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The maximum number of groups to return in the response - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *ListGroupsRequest) Reset() { - *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListGroupsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListGroupsRequest) ProtoMessage() {} - -func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 ListGroupsRequest.ProtoReflect.Descriptor instead. -func (*ListGroupsRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{11} -} - -func (x *ListGroupsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListGroupsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListGroupsRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListGroupsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -type ListGroupsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "group" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListGroupsResponse) Reset() { - *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListGroupsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListGroupsResponse) ProtoMessage() {} - -func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 ListGroupsResponse.ProtoReflect.Descriptor instead. -func (*ListGroupsResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{12} -} - -func (x *ListGroupsResponse) GetGroups() []*Group { - if x != nil { - return x.Groups - } - return nil -} - -func (x *ListGroupsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type GetGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetGroupRequest) Reset() { - *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupRequest) ProtoMessage() {} - -func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_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 GetGroupRequest.ProtoReflect.Descriptor instead. -func (*GetGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{13} -} - -func (x *GetGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type CreateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource to create - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *CreateGroupRequest) Reset() { - *x = CreateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupRequest) ProtoMessage() {} - -func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[14] - 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 CreateGroupRequest.ProtoReflect.Descriptor instead. -func (*CreateGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{14} -} - -func (x *CreateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type UpdateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The group resource which replaces the resource on the server - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupRequest) ProtoMessage() {} - -func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[15] - 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 UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{15} -} - -func (x *UpdateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -func (x *UpdateGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -type DeleteGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteGroupRequest) Reset() { - *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteGroupRequest) ProtoMessage() {} - -func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[16] - 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 DeleteGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{16} -} - -func (x *DeleteGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type AddMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The id of the group to add a member to - GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // The account id to add - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` -} - -func (x *AddMemberRequest) Reset() { - *x = AddMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddMemberRequest) ProtoMessage() {} - -func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[17] - 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 AddMemberRequest.ProtoReflect.Descriptor instead. -func (*AddMemberRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{17} -} - -func (x *AddMemberRequest) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *AddMemberRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -type RemoveMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The id of the group to remove a member from - GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // The account id to remove - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` -} - -func (x *RemoveMemberRequest) Reset() { - *x = RemoveMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveMemberRequest) ProtoMessage() {} - -func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[18] - 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 RemoveMemberRequest.ProtoReflect.Descriptor instead. -func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{18} -} - -func (x *RemoveMemberRequest) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *RemoveMemberRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -type ListMembersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` - // The id of the group to list members from - Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ListMembersRequest) Reset() { - *x = ListMembersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMembersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersRequest) ProtoMessage() {} - -func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[19] - 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 ListMembersRequest.ProtoReflect.Descriptor instead. -func (*ListMembersRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{19} -} - -func (x *ListMembersRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListMembersRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListMembersRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListMembersRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (x *ListMembersRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ListMembersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "members" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Members []*Account `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListMembersResponse) Reset() { - *x = ListMembersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMembersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersResponse) ProtoMessage() {} - -func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[20] - 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 ListMembersResponse.ProtoReflect.Descriptor instead. -func (*ListMembersResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{20} -} - -func (x *ListMembersResponse) GetMembers() []*Account { - if x != nil { - return x.Members - } - return nil -} - -func (x *ListMembersResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type Group struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier for the group. - // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The display name for the group. This property is required when a group is created and cannot be cleared during updates. - // Returned by default. Supports $filter and $orderby. - // groupofnames MUST cn - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // groupofnames MUST/MAY member - // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. - // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later - Members []*Account `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` - // groupofnames MAY businessCategory - // groupofnames MAY o - // groupofnames MAY ou - // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners - Owners []*Account `protobuf:"bytes,4,rep,name=owners,proto3" json:"owners,omitempty"` - // An optional description for the group. Returned by default. - // groupofnames MAY description - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // used for exposing the user using ldap - // posixgroup MUST gidnumber - GidNumber int64 `protobuf:"varint,6,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` - // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created - // Returned by default. Read-only. - CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` - // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. - // Returned by default. Read-only. - DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` - // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. - // Returned by default. Read-only. - ExpirationDateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiration_date_time,json=expirationDateTime,proto3" json:"expiration_date_time,omitempty"` - // True if the group is not displayed in certain parts of the Outlook user interface: - // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. - // Returned only on $select. - HideFromAddressLists bool `protobuf:"varint,10,opt,name=hide_from_address_lists,json=hideFromAddressLists,proto3" json:"hide_from_address_lists,omitempty"` - // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. - // Visibility can be set only when a group is created; it is not editable. - // Returned by default. - Visibility string `protobuf:"bytes,11,opt,name=visibility,proto3" json:"visibility,omitempty"` - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). - // Returned by default. Read-only. Supports $filter. - OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` - // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. - OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. - OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` - // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` - // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - OnPremisesNetBiosName string `protobuf:"bytes,26,opt,name=on_premises_net_bios_name,json=onPremisesNetBiosName,proto3" json:"on_premises_net_bios_name,omitempty"` - // Indicates the last time at which the group was synced with the on-premises directory. - // Returned by default. Read-only. Supports $filter. - OnPremisesLastSyncDateTime string `protobuf:"bytes,27,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` - // Errors when using synchronization during provisioning. - OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,28,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` -} - -func (x *Group) Reset() { - *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Group) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Group) ProtoMessage() {} - -func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[21] - 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 Group.ProtoReflect.Descriptor instead. -func (*Group) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{21} -} - -func (x *Group) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Group) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Group) GetMembers() []*Account { - if x != nil { - return x.Members - } - return nil -} - -func (x *Group) GetOwners() []*Account { - if x != nil { - return x.Owners - } - return nil -} - -func (x *Group) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Group) GetGidNumber() int64 { - if x != nil { - return x.GidNumber - } - return 0 -} - -func (x *Group) GetCreatedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreatedDateTime - } - return nil -} - -func (x *Group) GetDeletedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.DeletedDateTime - } - return nil -} - -func (x *Group) GetExpirationDateTime() *timestamppb.Timestamp { - if x != nil { - return x.ExpirationDateTime - } - return nil -} - -func (x *Group) GetHideFromAddressLists() bool { - if x != nil { - return x.HideFromAddressLists - } - return false -} - -func (x *Group) GetVisibility() string { - if x != nil { - return x.Visibility - } - return "" -} - -func (x *Group) GetOnPremisesSyncEnabled() bool { - if x != nil { - return x.OnPremisesSyncEnabled - } - return false -} - -func (x *Group) GetOnPremisesImmutableId() string { - if x != nil { - return x.OnPremisesImmutableId - } - return "" -} - -func (x *Group) GetOnPremisesSecurityIdentifier() string { - if x != nil { - return x.OnPremisesSecurityIdentifier - } - return "" -} - -func (x *Group) GetOnPremisesDistinguishedName() string { - if x != nil { - return x.OnPremisesDistinguishedName - } - return "" -} - -func (x *Group) GetOnPremisesSamAccountName() string { - if x != nil { - return x.OnPremisesSamAccountName - } - return "" -} - -func (x *Group) GetOnPremisesDomainName() string { - if x != nil { - return x.OnPremisesDomainName - } - return "" -} - -func (x *Group) GetOnPremisesNetBiosName() string { - if x != nil { - return x.OnPremisesNetBiosName - } - return "" -} - -func (x *Group) GetOnPremisesLastSyncDateTime() string { - if x != nil { - return x.OnPremisesLastSyncDateTime - } - return "" -} - -func (x *Group) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { - if x != nil { - return x.OnPremisesProvisioningErrors - } - return nil -} - -type OnPremisesProvisioningError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // The date and time at which the error occurred. - OccurredDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=occurred_date_time,json=occurredDateTime,proto3" json:"occurred_date_time,omitempty"` - // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress - PropertyCausingError string `protobuf:"bytes,3,opt,name=property_causing_error,json=propertyCausingError,proto3" json:"property_causing_error,omitempty"` - // Value of the property causing the error. - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *OnPremisesProvisioningError) Reset() { - *x = OnPremisesProvisioningError{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnPremisesProvisioningError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnPremisesProvisioningError) ProtoMessage() {} - -func (x *OnPremisesProvisioningError) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[22] - 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 OnPremisesProvisioningError.ProtoReflect.Descriptor instead. -func (*OnPremisesProvisioningError) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{22} -} - -func (x *OnPremisesProvisioningError) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *OnPremisesProvisioningError) GetOccurredDateTime() *timestamppb.Timestamp { - if x != nil { - return x.OccurredDateTime - } - return nil -} - -func (x *OnPremisesProvisioningError) GetPropertyCausingError() string { - if x != nil { - return x.PropertyCausingError - } - return "" -} - -func (x *OnPremisesProvisioningError) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_proto_v0_accounts_proto protoreflect.FileDescriptor - -var file_proto_v0_accounts_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 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, 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, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, - 0x0a, 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x82, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x40, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x95, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 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, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0xdd, 0x0d, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, - 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, - 0x66, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 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, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, - 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, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, - 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, - 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, - 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x50, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5f, 0x0a, 0x1f, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x1c, 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, 0x1a, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, 0x61, 0x73, - 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x69, 0x0a, 0x24, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x29, 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, 0x1f, 0x65, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x67, 0x0a, 0x23, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x3c, 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, 0x1e, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x25, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, - 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x3d, - 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, 0x1f, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x74, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x20, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x64, 0x22, 0xe0, 0x02, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x1a, 0x6c, 0x61, 0x73, - 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x22, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1d, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12, - 0x59, 0x0a, 0x2b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x69, - 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x66, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x66, 0x61, 0x22, 0xb2, 0x01, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 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, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, - 0x7a, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x21, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, - 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x18, 0x02, 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, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, - 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, - 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x09, 0x0a, - 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x07, 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, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 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, 0x0f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x14, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 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, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x68, 0x69, - 0x64, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x69, 0x64, - 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, - 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, - 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, - 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x19, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x62, 0x69, 0x6f, 0x73, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4e, 0x65, 0x74, 0x42, 0x69, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x43, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, - 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x1b, 0x4f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x12, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x10, 0x6f, - 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x63, 0x61, 0x75, 0x73, - 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x43, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x0f, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0xa2, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, - 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x90, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, - 0x89, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0xd2, 0x09, 0x0a, 0x0d, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9a, 0x01, - 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x30, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x88, 0x01, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x67, - 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x83, 0x01, - 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, - 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, - 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, - 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, - 0x32, 0xaa, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xda, 0x02, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, - 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, - 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, - 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, - 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, - 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, - 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, - 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, - 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, - 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3d, 0x0a, 0x10, 0x44, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, - 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_proto_v0_accounts_proto_rawDescOnce sync.Once - file_proto_v0_accounts_proto_rawDescData = file_proto_v0_accounts_proto_rawDesc -) - -func file_proto_v0_accounts_proto_rawDescGZIP() []byte { - file_proto_v0_accounts_proto_rawDescOnce.Do(func() { - file_proto_v0_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_v0_accounts_proto_rawDescData) - }) - return file_proto_v0_accounts_proto_rawDescData -} - -var file_proto_v0_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_proto_v0_accounts_proto_goTypes = []interface{}{ - (*RebuildIndexRequest)(nil), // 0: com.owncloud.ocis.accounts.v0.RebuildIndexRequest - (*RebuildIndexResponse)(nil), // 1: com.owncloud.ocis.accounts.v0.RebuildIndexResponse - (*ListAccountsRequest)(nil), // 2: com.owncloud.ocis.accounts.v0.ListAccountsRequest - (*ListAccountsResponse)(nil), // 3: com.owncloud.ocis.accounts.v0.ListAccountsResponse - (*GetAccountRequest)(nil), // 4: com.owncloud.ocis.accounts.v0.GetAccountRequest - (*CreateAccountRequest)(nil), // 5: com.owncloud.ocis.accounts.v0.CreateAccountRequest - (*UpdateAccountRequest)(nil), // 6: com.owncloud.ocis.accounts.v0.UpdateAccountRequest - (*DeleteAccountRequest)(nil), // 7: com.owncloud.ocis.accounts.v0.DeleteAccountRequest - (*Account)(nil), // 8: com.owncloud.ocis.accounts.v0.Account - (*Identities)(nil), // 9: com.owncloud.ocis.accounts.v0.Identities - (*PasswordProfile)(nil), // 10: com.owncloud.ocis.accounts.v0.PasswordProfile - (*ListGroupsRequest)(nil), // 11: com.owncloud.ocis.accounts.v0.ListGroupsRequest - (*ListGroupsResponse)(nil), // 12: com.owncloud.ocis.accounts.v0.ListGroupsResponse - (*GetGroupRequest)(nil), // 13: com.owncloud.ocis.accounts.v0.GetGroupRequest - (*CreateGroupRequest)(nil), // 14: com.owncloud.ocis.accounts.v0.CreateGroupRequest - (*UpdateGroupRequest)(nil), // 15: com.owncloud.ocis.accounts.v0.UpdateGroupRequest - (*DeleteGroupRequest)(nil), // 16: com.owncloud.ocis.accounts.v0.DeleteGroupRequest - (*AddMemberRequest)(nil), // 17: com.owncloud.ocis.accounts.v0.AddMemberRequest - (*RemoveMemberRequest)(nil), // 18: com.owncloud.ocis.accounts.v0.RemoveMemberRequest - (*ListMembersRequest)(nil), // 19: com.owncloud.ocis.accounts.v0.ListMembersRequest - (*ListMembersResponse)(nil), // 20: com.owncloud.ocis.accounts.v0.ListMembersResponse - (*Group)(nil), // 21: com.owncloud.ocis.accounts.v0.Group - (*OnPremisesProvisioningError)(nil), // 22: com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 25: google.protobuf.Empty -} -var file_proto_v0_accounts_proto_depIdxs = []int32{ - 23, // 0: com.owncloud.ocis.accounts.v0.ListAccountsRequest.field_mask:type_name -> google.protobuf.FieldMask - 8, // 1: com.owncloud.ocis.accounts.v0.ListAccountsResponse.accounts:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 2: com.owncloud.ocis.accounts.v0.CreateAccountRequest.account:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 3: com.owncloud.ocis.accounts.v0.UpdateAccountRequest.account:type_name -> com.owncloud.ocis.accounts.v0.Account - 23, // 4: com.owncloud.ocis.accounts.v0.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask - 9, // 5: com.owncloud.ocis.accounts.v0.Account.identities:type_name -> com.owncloud.ocis.accounts.v0.Identities - 10, // 6: com.owncloud.ocis.accounts.v0.Account.password_profile:type_name -> com.owncloud.ocis.accounts.v0.PasswordProfile - 21, // 7: com.owncloud.ocis.accounts.v0.Account.memberOf:type_name -> com.owncloud.ocis.accounts.v0.Group - 24, // 8: com.owncloud.ocis.accounts.v0.Account.created_date_time:type_name -> google.protobuf.Timestamp - 24, // 9: com.owncloud.ocis.accounts.v0.Account.deleted_date_time:type_name -> google.protobuf.Timestamp - 24, // 10: com.owncloud.ocis.accounts.v0.Account.on_premises_last_sync_date_time:type_name -> google.protobuf.Timestamp - 22, // 11: com.owncloud.ocis.accounts.v0.Account.on_premises_provisioning_errors:type_name -> com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - 24, // 12: com.owncloud.ocis.accounts.v0.Account.external_user_state_change_date_time:type_name -> google.protobuf.Timestamp - 24, // 13: com.owncloud.ocis.accounts.v0.Account.refresh_tokens_valid_from_date_time:type_name -> google.protobuf.Timestamp - 24, // 14: com.owncloud.ocis.accounts.v0.Account.sign_in_sessions_valid_from_date_time:type_name -> google.protobuf.Timestamp - 24, // 15: com.owncloud.ocis.accounts.v0.PasswordProfile.last_password_change_date_time:type_name -> google.protobuf.Timestamp - 23, // 16: com.owncloud.ocis.accounts.v0.ListGroupsRequest.field_mask:type_name -> google.protobuf.FieldMask - 21, // 17: com.owncloud.ocis.accounts.v0.ListGroupsResponse.groups:type_name -> com.owncloud.ocis.accounts.v0.Group - 21, // 18: com.owncloud.ocis.accounts.v0.CreateGroupRequest.group:type_name -> com.owncloud.ocis.accounts.v0.Group - 21, // 19: com.owncloud.ocis.accounts.v0.UpdateGroupRequest.group:type_name -> com.owncloud.ocis.accounts.v0.Group - 23, // 20: com.owncloud.ocis.accounts.v0.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask - 23, // 21: com.owncloud.ocis.accounts.v0.ListMembersRequest.field_mask:type_name -> google.protobuf.FieldMask - 8, // 22: com.owncloud.ocis.accounts.v0.ListMembersResponse.members:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 23: com.owncloud.ocis.accounts.v0.Group.members:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 24: com.owncloud.ocis.accounts.v0.Group.owners:type_name -> com.owncloud.ocis.accounts.v0.Account - 24, // 25: com.owncloud.ocis.accounts.v0.Group.created_date_time:type_name -> google.protobuf.Timestamp - 24, // 26: com.owncloud.ocis.accounts.v0.Group.deleted_date_time:type_name -> google.protobuf.Timestamp - 24, // 27: com.owncloud.ocis.accounts.v0.Group.expiration_date_time:type_name -> google.protobuf.Timestamp - 22, // 28: com.owncloud.ocis.accounts.v0.Group.on_premises_provisioning_errors:type_name -> com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - 24, // 29: com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError.occurred_date_time:type_name -> google.protobuf.Timestamp - 2, // 30: com.owncloud.ocis.accounts.v0.AccountsService.ListAccounts:input_type -> com.owncloud.ocis.accounts.v0.ListAccountsRequest - 4, // 31: com.owncloud.ocis.accounts.v0.AccountsService.GetAccount:input_type -> com.owncloud.ocis.accounts.v0.GetAccountRequest - 5, // 32: com.owncloud.ocis.accounts.v0.AccountsService.CreateAccount:input_type -> com.owncloud.ocis.accounts.v0.CreateAccountRequest - 6, // 33: com.owncloud.ocis.accounts.v0.AccountsService.UpdateAccount:input_type -> com.owncloud.ocis.accounts.v0.UpdateAccountRequest - 7, // 34: com.owncloud.ocis.accounts.v0.AccountsService.DeleteAccount:input_type -> com.owncloud.ocis.accounts.v0.DeleteAccountRequest - 11, // 35: com.owncloud.ocis.accounts.v0.GroupsService.ListGroups:input_type -> com.owncloud.ocis.accounts.v0.ListGroupsRequest - 13, // 36: com.owncloud.ocis.accounts.v0.GroupsService.GetGroup:input_type -> com.owncloud.ocis.accounts.v0.GetGroupRequest - 14, // 37: com.owncloud.ocis.accounts.v0.GroupsService.CreateGroup:input_type -> com.owncloud.ocis.accounts.v0.CreateGroupRequest - 15, // 38: com.owncloud.ocis.accounts.v0.GroupsService.UpdateGroup:input_type -> com.owncloud.ocis.accounts.v0.UpdateGroupRequest - 16, // 39: com.owncloud.ocis.accounts.v0.GroupsService.DeleteGroup:input_type -> com.owncloud.ocis.accounts.v0.DeleteGroupRequest - 17, // 40: com.owncloud.ocis.accounts.v0.GroupsService.AddMember:input_type -> com.owncloud.ocis.accounts.v0.AddMemberRequest - 18, // 41: com.owncloud.ocis.accounts.v0.GroupsService.RemoveMember:input_type -> com.owncloud.ocis.accounts.v0.RemoveMemberRequest - 19, // 42: com.owncloud.ocis.accounts.v0.GroupsService.ListMembers:input_type -> com.owncloud.ocis.accounts.v0.ListMembersRequest - 0, // 43: com.owncloud.ocis.accounts.v0.IndexService.RebuildIndex:input_type -> com.owncloud.ocis.accounts.v0.RebuildIndexRequest - 3, // 44: com.owncloud.ocis.accounts.v0.AccountsService.ListAccounts:output_type -> com.owncloud.ocis.accounts.v0.ListAccountsResponse - 8, // 45: com.owncloud.ocis.accounts.v0.AccountsService.GetAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 8, // 46: com.owncloud.ocis.accounts.v0.AccountsService.CreateAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 8, // 47: com.owncloud.ocis.accounts.v0.AccountsService.UpdateAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 25, // 48: com.owncloud.ocis.accounts.v0.AccountsService.DeleteAccount:output_type -> google.protobuf.Empty - 12, // 49: com.owncloud.ocis.accounts.v0.GroupsService.ListGroups:output_type -> com.owncloud.ocis.accounts.v0.ListGroupsResponse - 21, // 50: com.owncloud.ocis.accounts.v0.GroupsService.GetGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 51: com.owncloud.ocis.accounts.v0.GroupsService.CreateGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 52: com.owncloud.ocis.accounts.v0.GroupsService.UpdateGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 25, // 53: com.owncloud.ocis.accounts.v0.GroupsService.DeleteGroup:output_type -> google.protobuf.Empty - 21, // 54: com.owncloud.ocis.accounts.v0.GroupsService.AddMember:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 55: com.owncloud.ocis.accounts.v0.GroupsService.RemoveMember:output_type -> com.owncloud.ocis.accounts.v0.Group - 20, // 56: com.owncloud.ocis.accounts.v0.GroupsService.ListMembers:output_type -> com.owncloud.ocis.accounts.v0.ListMembersResponse - 1, // 57: com.owncloud.ocis.accounts.v0.IndexService.RebuildIndex:output_type -> com.owncloud.ocis.accounts.v0.RebuildIndexResponse - 44, // [44:58] is the sub-list for method output_type - 30, // [30:44] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name -} - -func init() { file_proto_v0_accounts_proto_init() } -func file_proto_v0_accounts_proto_init() { - if File_proto_v0_accounts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_v0_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identities); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PasswordProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMembersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMembersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnPremisesProvisioningError); 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_proto_v0_accounts_proto_rawDesc, - NumEnums: 0, - NumMessages: 23, - NumExtensions: 0, - NumServices: 3, - }, - GoTypes: file_proto_v0_accounts_proto_goTypes, - DependencyIndexes: file_proto_v0_accounts_proto_depIdxs, - MessageInfos: file_proto_v0_accounts_proto_msgTypes, - }.Build() - File_proto_v0_accounts_proto = out.File - file_proto_v0_accounts_proto_rawDesc = nil - file_proto_v0_accounts_proto_goTypes = nil - file_proto_v0_accounts_proto_depIdxs = nil -} diff --git a/accounts/pkg/proto/v0/accounts.pb.micro.go b/accounts/pkg/proto/v0/accounts.pb.micro.go deleted file mode 100644 index 63893df6d02..00000000000 --- a/accounts/pkg/proto/v0/accounts.pb.micro.go +++ /dev/null @@ -1,622 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/v0/accounts.proto - -package proto - -import ( - fmt "fmt" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - proto "google.golang.org/protobuf/proto" - emptypb "google.golang.org/protobuf/types/known/emptypb" - _ "google.golang.org/protobuf/types/known/fieldmaskpb" - _ "google.golang.org/protobuf/types/known/timestamppb" - math "math" -) - -import ( - context "context" - api "go-micro.dev/v4/api" - client "go-micro.dev/v4/client" - server "go-micro.dev/v4/server" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for AccountsService service - -func NewAccountsServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "AccountsService.ListAccounts", - Path: []string{"/api/v0/accounts/accounts-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.GetAccount", - Path: []string{"/api/v0/accounts/accounts-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.CreateAccount", - Path: []string{"/api/v0/accounts/accounts-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v0/accounts/accounts-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v0/accounts/accounts-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for AccountsService service - -type AccountsService interface { - // Lists accounts - ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) - // Gets an account - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) - // Creates an account - CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) - // Updates an account - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) - // Deletes an account - DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -type accountsService struct { - c client.Client - name string -} - -func NewAccountsService(name string, c client.Client) AccountsService { - return &accountsService{ - c: c, - name: name, - } -} - -func (c *accountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { - req := c.c.NewRequest(c.name, "AccountsService.ListAccounts", in) - out := new(ListAccountsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.GetAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.CreateAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.UpdateAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "AccountsService.DeleteAccount", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for AccountsService service - -type AccountsServiceHandler interface { - // Lists accounts - ListAccounts(context.Context, *ListAccountsRequest, *ListAccountsResponse) error - // Gets an account - GetAccount(context.Context, *GetAccountRequest, *Account) error - // Creates an account - CreateAccount(context.Context, *CreateAccountRequest, *Account) error - // Updates an account - UpdateAccount(context.Context, *UpdateAccountRequest, *Account) error - // Deletes an account - DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error -} - -func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler, opts ...server.HandlerOption) error { - type accountsService interface { - ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error - GetAccount(ctx context.Context, in *GetAccountRequest, out *Account) error - CreateAccount(ctx context.Context, in *CreateAccountRequest, out *Account) error - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *Account) error - DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error - } - type AccountsService struct { - accountsService - } - h := &accountsServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.ListAccounts", - Path: []string{"/api/v0/accounts/accounts-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.GetAccount", - Path: []string{"/api/v0/accounts/accounts-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.CreateAccount", - Path: []string{"/api/v0/accounts/accounts-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v0/accounts/accounts-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v0/accounts/accounts-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&AccountsService{h}, opts...)) -} - -type accountsServiceHandler struct { - AccountsServiceHandler -} - -func (h *accountsServiceHandler) ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error { - return h.AccountsServiceHandler.ListAccounts(ctx, in, out) -} - -func (h *accountsServiceHandler) GetAccount(ctx context.Context, in *GetAccountRequest, out *Account) error { - return h.AccountsServiceHandler.GetAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) CreateAccount(ctx context.Context, in *CreateAccountRequest, out *Account) error { - return h.AccountsServiceHandler.CreateAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *Account) error { - return h.AccountsServiceHandler.UpdateAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error { - return h.AccountsServiceHandler.DeleteAccount(ctx, in, out) -} - -// Api Endpoints for GroupsService service - -func NewGroupsServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "GroupsService.ListGroups", - Path: []string{"/api/v0/accounts/groups-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.GetGroup", - Path: []string{"/api/v0/accounts/groups-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.CreateGroup", - Path: []string{"/api/v0/accounts/groups-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v0/accounts/groups-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v0/accounts/groups-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.AddMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.RemoveMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.ListMembers", - Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for GroupsService service - -type GroupsService interface { - // Lists groups - ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) - // Gets an groups - GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*Group, error) - // Creates a group - CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*Group, error) - // Updates a group - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*Group, error) - // Deletes a group - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*Group, error) - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*Group, error) - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) -} - -type groupsService struct { - c client.Client - name string -} - -func NewGroupsService(name string, c client.Client) GroupsService { - return &groupsService{ - c: c, - name: name, - } -} - -func (c *groupsService) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) { - req := c.c.NewRequest(c.name, "GroupsService.ListGroups", in) - out := new(ListGroupsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.GetGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.CreateGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.UpdateGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "GroupsService.DeleteGroup", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.AddMember", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.RemoveMember", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) { - req := c.c.NewRequest(c.name, "GroupsService.ListMembers", in) - out := new(ListMembersResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for GroupsService service - -type GroupsServiceHandler interface { - // Lists groups - ListGroups(context.Context, *ListGroupsRequest, *ListGroupsResponse) error - // Gets an groups - GetGroup(context.Context, *GetGroupRequest, *Group) error - // Creates a group - CreateGroup(context.Context, *CreateGroupRequest, *Group) error - // Updates a group - UpdateGroup(context.Context, *UpdateGroupRequest, *Group) error - // Deletes a group - DeleteGroup(context.Context, *DeleteGroupRequest, *emptypb.Empty) error - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(context.Context, *AddMemberRequest, *Group) error - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(context.Context, *RemoveMemberRequest, *Group) error - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - ListMembers(context.Context, *ListMembersRequest, *ListMembersResponse) error -} - -func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, opts ...server.HandlerOption) error { - type groupsService interface { - ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error - GetGroup(ctx context.Context, in *GetGroupRequest, out *Group) error - CreateGroup(ctx context.Context, in *CreateGroupRequest, out *Group) error - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *Group) error - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error - AddMember(ctx context.Context, in *AddMemberRequest, out *Group) error - RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *Group) error - ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error - } - type GroupsService struct { - groupsService - } - h := &groupsServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.ListGroups", - Path: []string{"/api/v0/accounts/groups-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.GetGroup", - Path: []string{"/api/v0/accounts/groups-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.CreateGroup", - Path: []string{"/api/v0/accounts/groups-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v0/accounts/groups-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v0/accounts/groups-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.AddMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.RemoveMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.ListMembers", - Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&GroupsService{h}, opts...)) -} - -type groupsServiceHandler struct { - GroupsServiceHandler -} - -func (h *groupsServiceHandler) ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error { - return h.GroupsServiceHandler.ListGroups(ctx, in, out) -} - -func (h *groupsServiceHandler) GetGroup(ctx context.Context, in *GetGroupRequest, out *Group) error { - return h.GroupsServiceHandler.GetGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) CreateGroup(ctx context.Context, in *CreateGroupRequest, out *Group) error { - return h.GroupsServiceHandler.CreateGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *Group) error { - return h.GroupsServiceHandler.UpdateGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error { - return h.GroupsServiceHandler.DeleteGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) AddMember(ctx context.Context, in *AddMemberRequest, out *Group) error { - return h.GroupsServiceHandler.AddMember(ctx, in, out) -} - -func (h *groupsServiceHandler) RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *Group) error { - return h.GroupsServiceHandler.RemoveMember(ctx, in, out) -} - -func (h *groupsServiceHandler) ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error { - return h.GroupsServiceHandler.ListMembers(ctx, in, out) -} - -// Api Endpoints for IndexService service - -func NewIndexServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "IndexService.RebuildIndex", - Path: []string{"/api/v0/index/rebuild"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for IndexService service - -type IndexService interface { - RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) -} - -type indexService struct { - c client.Client - name string -} - -func NewIndexService(name string, c client.Client) IndexService { - return &indexService{ - c: c, - name: name, - } -} - -func (c *indexService) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) { - req := c.c.NewRequest(c.name, "IndexService.RebuildIndex", in) - out := new(RebuildIndexResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for IndexService service - -type IndexServiceHandler interface { - RebuildIndex(context.Context, *RebuildIndexRequest, *RebuildIndexResponse) error -} - -func RegisterIndexServiceHandler(s server.Server, hdlr IndexServiceHandler, opts ...server.HandlerOption) error { - type indexService interface { - RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error - } - type IndexService struct { - indexService - } - h := &indexServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "IndexService.RebuildIndex", - Path: []string{"/api/v0/index/rebuild"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&IndexService{h}, opts...)) -} - -type indexServiceHandler struct { - IndexServiceHandler -} - -func (h *indexServiceHandler) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error { - return h.IndexServiceHandler.RebuildIndex(ctx, in, out) -} diff --git a/accounts/pkg/proto/v0/accounts.pb.micro_test.go b/accounts/pkg/proto/v0/accounts.pb.micro_test.go deleted file mode 100644 index 003746f4f1c..00000000000 --- a/accounts/pkg/proto/v0/accounts.pb.micro_test.go +++ /dev/null @@ -1,1317 +0,0 @@ -package proto_test - -import ( - "context" - "errors" - "fmt" - "io/ioutil" - "log" - "os" - "path/filepath" - "testing" - - mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v4" - empty "github.com/golang/protobuf/ptypes/empty" - "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/logging" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" - svc "github.com/owncloud/ocis/accounts/pkg/service/v0" - "github.com/owncloud/ocis/ocis-pkg/service/grpc" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" - "github.com/stretchr/testify/assert" - "go-micro.dev/v4/client" - merrors "go-micro.dev/v4/errors" - "google.golang.org/genproto/protobuf/field_mask" - "google.golang.org/protobuf/types/known/timestamppb" -) - -var service = grpc.NewService() - -var dataPath = createTmpDir() - -var newCreatedAccounts = []string{} -var newCreatedGroups = []string{} - -var mockedRoleAssignment = map[string]string{} - -var ( - user1 = proto.Account{ - Id: "f9149a32-2b8e-4f04-9e8d-937d81712b9a", - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "User One", - PreferredName: "user1", - OnPremisesSamAccountName: "user1", - UidNumber: 20009, - GidNumber: 30000, - Mail: "user1@example.com", - Identities: []*proto.Identities{nil}, - PasswordProfile: &proto.PasswordProfile{Password: "heysdjfsdlk"}, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users - }, - } - user2 = proto.Account{ - Id: "e9149a32-2b8e-4f04-9e8d-937d81712b9a", - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "User Two", - PreferredName: "user2", - OnPremisesSamAccountName: "user2", - UidNumber: 20010, - GidNumber: 30000, - Mail: "user2@example.com", - Identities: []*proto.Identities{nil}, - PasswordProfile: &proto.PasswordProfile{Password: "hello123"}, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users - }, - } -) - -func init() { - service = grpc.NewService( - grpc.Namespace("com.owncloud.api"), - grpc.Name("accounts"), - grpc.Address("localhost:9180"), - ) - - cfg := config.DefaultConfig() - cfg.Repo.Backend = "disk" - cfg.Repo.Disk.Path = dataPath - cfg.DemoUsersAndGroups = true - cfg.Log = &config.Log{} - var hdlr *svc.Service - var err error - - hdlr, err = svc.New( - svc.Logger(logging.Configure(cfg.Service.Name, cfg.Log)), - svc.Config(cfg), - svc.RoleService(buildRoleServiceMock()), - ) - - if err != nil { - log.Fatalf("Could not create new service") - } - - err = proto.RegisterAccountsServiceHandler(service.Server(), hdlr) - if err != nil { - log.Fatal("could not register the Accounts handler") - } - err = proto.RegisterGroupsServiceHandler(service.Server(), hdlr) - if err != nil { - log.Fatal("could not register the Groups handler") - } - - err = service.Server().Start() - if err != nil { - log.Fatal(err) - } -} - -func getAccount(user string) *proto.Account { - switch user { - case "user1": - return &user1 - case "user2": - return &user2 - default: - return &proto.Account{ - Id: fmt.Sprintf("new-id-%s", user), - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "Regular User", - PreferredName: user, - UidNumber: 2, - Mail: fmt.Sprintf("%s@example.com", user), - Identities: []*proto.Identities{nil}, - } - } -} - -func getGroup(group string) *proto.Group { - switch group { - case "sysusers": - return &proto.Group{Id: "34f38767-c937-4eb6-b847-1c175829a2a0", GidNumber: 15000, OnPremisesSamAccountName: "sysusers", DisplayName: "Technical users", Description: "A group for technical users. They should not show up in sharing dialogs.", Members: []*proto.Account{ - {Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf"}, // idp - {Id: "bc596f3c-c955-4328-80a0-60d018b4ad57"}, // reva - }} - case "users": - return &proto.Group{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa", GidNumber: 30000, OnPremisesSamAccountName: "users", DisplayName: "Users", Description: "A group every normal user belongs to.", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "sailing-lovers": - return &proto.Group{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - }} - case "violin-haters": - return &proto.Group{Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - }} - case "radium-lovers": - return &proto.Group{Id: "7b87fd49-286e-4a5f-bafd-c535d5dd997a", GidNumber: 30003, OnPremisesSamAccountName: "radium-lovers", DisplayName: "Radium lovers", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "polonium-lovers": - return &proto.Group{Id: "cedc21aa-4072-4614-8676-fa9165f598ff", GidNumber: 30004, OnPremisesSamAccountName: "polonium-lovers", DisplayName: "Polonium lovers", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "quantum-lovers": - return &proto.Group{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*proto.Account{ - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "philosophy-haters": - return &proto.Group{Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*proto.Account{ - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "physics-lovers": - return &proto.Group{Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e", GidNumber: 30007, OnPremisesSamAccountName: "physics-lovers", DisplayName: "Physics lovers", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - } - return nil -} - -func getTestGroups(group string) *proto.Group { - switch group { - case "grp1": - return &proto.Group{Id: "0779f828-4df8-41d6-82dd-40020d9fd0ef", GidNumber: 40000, OnPremisesSamAccountName: "grp1", DisplayName: "Group One", Description: "One group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "grp2": - return &proto.Group{Id: "f446fb0a-5e57-4812-9f47-9c1ebca99b5a", GidNumber: 40001, OnPremisesSamAccountName: "grp2", DisplayName: "Group Two", Description: "Two Group", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "grp3": - return &proto.Group{Id: "cae8b5d5-d133-4d95-8595-fe33a5051017", GidNumber: 40002, OnPremisesSamAccountName: "grp3", DisplayName: "Group Three", Description: "Three Group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - } - return nil -} - -func buildRoleServiceMock() settings.RoleService { - return settings.MockRoleService{ - AssignRoleToUserFunc: func(ctx context.Context, req *settings.AssignRoleToUserRequest, opts ...client.CallOption) (res *settings.AssignRoleToUserResponse, err error) { - mockedRoleAssignment[req.AccountUuid] = req.RoleId - return &settings.AssignRoleToUserResponse{ - Assignment: &settings.UserRoleAssignment{ - AccountUuid: req.AccountUuid, - RoleId: req.RoleId, - }, - }, nil - }, - } -} - -func cleanUp(t *testing.T) { - datastore := filepath.Join(dataPath, "accounts") - - for _, id := range newCreatedAccounts { - path := filepath.Join(datastore, id) - if _, err := os.Stat(path); os.IsNotExist(err) { - continue - } - _, _ = deleteAccount(t, id) - } - - datastore = filepath.Join(dataPath, "groups") - - for _, id := range newCreatedGroups { - path := filepath.Join(datastore, id) - if _, err := os.Stat(path); os.IsNotExist(err) { - continue - } - _, _ = deleteGroup(t, id) - } - - newCreatedAccounts = []string{} - newCreatedGroups = []string{} -} - -func assertUserExists(t *testing.T, account *proto.Account) { - resp, _ := listAccounts(t) - assertResponseContainsUser(t, resp, account) -} - -func assertResponseContainsUser(t *testing.T, response *proto.ListAccountsResponse, account *proto.Account) { - var result *proto.Account - for _, a := range response.Accounts { - if a.Id == account.Id { - result = account - } - } - if result == nil { - t.Fatalf("Account not found in response: %s", account.PreferredName) - } - assertAccountsSame(t, account, result) -} - -func assertResponseNotContainsUser(t *testing.T, response *proto.ListAccountsResponse, account *proto.Account) { - for _, a := range response.Accounts { - if a.Id == account.Id || a.PreferredName == account.PreferredName { - t.Fatal("Account was not expected to be present in the response, but was found.") - } - } -} - -func assertAccountsSame(t *testing.T, acc1, acc2 *proto.Account) { - assert.Equal(t, acc1.Id, acc2.Id) - assert.Equal(t, acc1.AccountEnabled, acc2.AccountEnabled) - assert.Equal(t, acc1.IsResourceAccount, acc2.IsResourceAccount) - assert.Equal(t, acc1.CreationType, acc2.CreationType) - assert.Equal(t, acc1.DisplayName, acc2.DisplayName) - assert.Equal(t, acc1.PreferredName, acc2.PreferredName) - assert.Equal(t, acc1.UidNumber, acc2.UidNumber) - assert.Equal(t, acc1.OnPremisesSamAccountName, acc2.OnPremisesSamAccountName) - assert.Equal(t, acc1.GidNumber, acc2.GidNumber) - assert.Equal(t, acc1.Mail, acc2.Mail) -} - -func assertResponseContainsGroup(t *testing.T, response *proto.ListGroupsResponse, group *proto.Group) { - var result *proto.Group - for _, g := range response.Groups { - if g.Id == group.Id { - result = g - } - } - if result == nil { - t.Fatalf("Group not found in response: %s", group.GetDisplayName()) - } - assertGroupsSame(t, group, result) -} - -func assertResponseNotContainsGroup(t *testing.T, response *proto.ListGroupsResponse, group *proto.Group) { - for _, g := range response.Groups { - if g.Id == group.Id && g.DisplayName == group.DisplayName { - t.Fatal("Group was not expected to be present in the response, but was found.") - } - } -} - -func assertGroupsSame(t *testing.T, grp1, grp2 *proto.Group) { - assert.Equal(t, grp1.Id, grp2.Id) - assert.Equal(t, grp1.GidNumber, grp2.GidNumber) - assert.Equal(t, grp1.OnPremisesSamAccountName, grp2.OnPremisesSamAccountName) - assert.Equal(t, grp1.DisplayName, grp2.DisplayName) - - assert.Equal(t, len(grp1.Members), len(grp2.Members)) - for _, m := range grp1.Members { - assertGroupHasMember(t, grp2, m.Id) - } -} - -func assertGroupHasMember(t *testing.T, grp *proto.Group, memberID string) { - for _, m := range grp.Members { - if m.Id == memberID { - return - } - } - - t.Fatalf("Member with id %s expected to be in group '%s', but not found", memberID, grp.DisplayName) -} - -func createAccount(t *testing.T, user string) (*proto.Account, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - account := getAccount(user) - request := &proto.CreateAccountRequest{Account: account} - res, err := cl.CreateAccount(context.Background(), request) - if err == nil { - newCreatedAccounts = append(newCreatedAccounts, account.Id) - } - return res, err -} - -func createGroup(t *testing.T, group *proto.Group) (*proto.Group, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - request := &proto.CreateGroupRequest{Group: group} - res, err := cl.CreateGroup(context.Background(), request) - if err == nil { - newCreatedGroups = append(newCreatedGroups, group.Id) - } - return res, err -} - -func updateAccount(t *testing.T, account *proto.Account, updateArray []string) (*proto.Account, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - updateMask := &field_mask.FieldMask{ - Paths: updateArray, - } - request := &proto.UpdateAccountRequest{Account: account, UpdateMask: updateMask} - res, err := cl.UpdateAccount(context.Background(), request) - - return res, err -} - -func listAccounts(t *testing.T) (*proto.ListAccountsResponse, error) { - request := &proto.ListAccountsRequest{} - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - response, err := cl.ListAccounts(context.Background(), request) - return response, err -} - -func listGroups(t *testing.T) *proto.ListGroupsResponse { - request := &proto.ListGroupsRequest{} - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - response, err := cl.ListGroups(context.Background(), request) - assert.NoError(t, err) - return response -} - -func deleteAccount(t *testing.T, id string) (*empty.Empty, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteAccountRequest{Id: id} - res, err := cl.DeleteAccount(context.Background(), req) - return res, err -} - -func deleteGroup(t *testing.T, id string) (*empty.Empty, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - return res, err -} - -// createTmpDir creates a temporary dir for tests data. -func createTmpDir() string { - name, err := ioutil.TempDir("/tmp", "ocis-accounts-store-") - if err != nil { - panic(err) - } - - return name -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestCreateAccount(t *testing.T) { - resp, err := createAccount(t, "user1") - assert.NoError(t, err) - assertUserExists(t, getAccount("user1")) - assert.IsType(t, &proto.Account{}, resp) - // Account is not returned in response - // assertAccountsSame(t, getAccount("user1"), resp) - - resp, err = createAccount(t, "user2") - assert.NoError(t, err) - assertUserExists(t, getAccount("user2")) - assert.IsType(t, &proto.Account{}, resp) - // Account is not returned in response - // assertAccountsSame(t, getAccount("user2"), resp) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis-accounts/issues/62 -func TestCreateExistingUser(t *testing.T) { - var err error - _, err = createAccount(t, "user1") - assert.NoError(t, err) - - _, err = createAccount(t, "user1") - assert.Error(t, err) - assertUserExists(t, getAccount("user1")) - - cleanUp(t) -} - -// All tests fail after running this -// https://github.com/owncloud/ocis/accounts-issues/62 -func TestCreateAccountInvalidUserName(t *testing.T) { - - resp, err := listAccounts(t) - assert.NoError(t, err) - numAccounts := len(resp.GetAccounts()) - - testData := []string{ - "", - "0", - "#&@#", - ".._$%203", - } - - for _, userName := range testData { - _, err := createAccount(t, userName) - - // Should give error - if err == nil { - t.Fatalf("Expected an Error when creating user '%s' but got nil", userName) - } - } - - // resp should have the same number of accounts - resp, err = listAccounts(t) - assert.NoError(t, err) - - assert.Equal(t, numAccounts, len(resp.GetAccounts())) - - cleanUp(t) -} - -func TestUpdateAccount(t *testing.T) { - tests := []struct { - name string - userAccount *proto.Account - expectedErrOnUpdate error - }{ - { - "Update user (demonstration of updatable fields)", - &proto.Account{ - DisplayName: "Alice Hansen", - PreferredName: "Wonderful-Alice", - OnPremisesSamAccountName: "Alice", - UidNumber: 20010, - GidNumber: 30001, - Mail: "alice@example.com", - }, - nil, - }, - { - "Update user with unicode data", - &proto.Account{ - DisplayName: "एलिस हेन्सेन", - PreferredName: "अद्भुत-एलिस", - OnPremisesSamAccountName: "एलिस", - UidNumber: 20010, - GidNumber: 30001, - Mail: "एलिस@उदाहरण.com", - }, - merrors.BadRequest("com.owncloud.api.accounts", "preferred_name 'अद्भुत-एलिस' must be at least the local part of an email"), - }, - { - "Update user with empty data values", - &proto.Account{ - DisplayName: "", - PreferredName: "", - OnPremisesSamAccountName: "", - UidNumber: 0, - GidNumber: 0, - Mail: "", - }, - merrors.BadRequest("com.owncloud.api.accounts", "preferred_name '' must be at least the local part of an email"), - }, - { - "Update user with strange data", - &proto.Account{ - DisplayName: "12345", - PreferredName: "a12345", - OnPremisesSamAccountName: "a54321", - UidNumber: 1000, - GidNumber: 1000, - Mail: "1.2@3.c_@", - }, - merrors.BadRequest("com.owncloud.api.accounts", "mail '1.2@3.c_@' must be a valid email"), - }, - } - - for _, tt := range tests { - // updatable fields for type Account - updateMask := []string{ - "AccountEnabled", - "IsResourceAccount", - "DisplayName", - "PreferredName", - "OnPremisesSamAccountName", - "UidNumber", - "GidNumber", - "Mail", - } - - t.Run(tt.name, func(t *testing.T) { - acc, err := createAccount(t, "user1") - assert.NoError(t, err) - - tt.userAccount.Id = acc.Id - tt.userAccount.AccountEnabled = false - tt.userAccount.IsResourceAccount = false - resp, err := updateAccount(t, tt.userAccount, updateMask) - if tt.expectedErrOnUpdate != nil { - assert.Error(t, err) - assert.Equal(t, tt.expectedErrOnUpdate.Error(), err.Error()) - } else { - assert.NoError(t, err) - assert.IsType(t, &proto.Account{}, resp) - assertAccountsSame(t, tt.userAccount, resp) - assertUserExists(t, tt.userAccount) - } - cleanUp(t) - }) - } -} - -func TestUpdateNonUpdatableFieldsInAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - tests := []struct { - name string - updateMask []string - userAccount *proto.Account - }{ - { - "Try to update creation type", - []string{ - "CreationType", - }, - &proto.Account{ - Id: user1.Id, - CreationType: "Type Test", - }, - }, - { - "Try to update password profile", - []string{ - "PasswordProfile", - }, - &proto.Account{ - Id: user1.Id, - PasswordProfile: &proto.PasswordProfile{Password: "new password"}, - }, - }, - { - "Try to update member of", - []string{ - "MemberOf", - }, - &proto.Account{ - Id: user1.Id, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - res, err := updateAccount(t, tt.userAccount, tt.updateMask) - if err == nil { - t.Fatalf("Expected error while updating non updatable field, but found none.") - } - assert.IsType(t, &proto.Account{}, res) - assert.Empty(t, res) - assert.Error(t, err) - - var e *merrors.Error - - if errors.As(err, &e) { - assert.EqualValues(t, 400, e.Code) - assert.Equal(t, "Bad Request", e.Status) - - errMsg := fmt.Sprintf("can not update field %s, either unknown or readonly", tt.updateMask[0]) - assert.Equal(t, errMsg, e.Detail) - } else { - t.Fatal("Expected merrors errors but found something else.") - } - }) - } - - cleanUp(t) -} - -func TestListAccounts(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - resp, err := listAccounts(t) - assert.NoError(t, err) - - assert.IsType(t, &proto.ListAccountsResponse{}, resp) - assert.Equal(t, 9, len(resp.Accounts)) - - assertResponseContainsUser(t, resp, getAccount("user1")) - assertResponseContainsUser(t, resp, getAccount("user2")) - - cleanUp(t) -} - -func TestListWithoutUserCreation(t *testing.T) { - resp, err := listAccounts(t) - assert.NoError(t, err) - - // Only 7 default users - assert.Equal(t, 7, len(resp.Accounts)) - cleanUp(t) -} - -func TestListAccountsWithFilterQuery(t *testing.T) { - scenarios := []struct { - name string - query string - expectedIDs []string - }{ - // FIXME: disabled test scenarios need to be supported when implementing OData support - // OData implementation tracked in https://github.com/owncloud/ocis/issues/716 - //{ - // name: "ListAccounts with exact match on preferred_name", - // query: "preferred_name eq 'user1'", - // expectedIDs: []string{user1.Id}, - //}, - { - name: "ListAccounts with exact match on on_premises_sam_account_name", - query: "on_premises_sam_account_name eq 'user1'", - expectedIDs: []string{user1.Id}, - }, - { - name: "ListAccounts with exact match on mail", - query: "mail eq 'user1@example.com'", - expectedIDs: []string{user1.Id}, - }, - //{ - // name: "ListAccounts with exact match on id", - // query: "id eq 'f9149a32-2b8e-4f04-9e8d-937d81712b9a'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name", - // query: "preferred_name eq 'wololo'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name AND mail", - // query: "preferred_name eq 'user1' and mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name AND mail", - // query: "preferred_name eq 'user1' and mail eq 'wololo@example.com'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name exists, mail exists", - // query: "preferred_name eq 'user1' or mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name exists, mail does not exist", - // query: "preferred_name eq 'user1' or mail eq 'wololo@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name does not exists, mail exists", - // query: "preferred_name eq 'wololo' or mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name OR mail, preferred_name and mail do not exist", - // query: "preferred_name eq 'wololo' or mail eq 'wololo@example.com'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with multiple matches on preferred_name", - // query: "startswith(preferred_name,'user*')", - // expectedIDs: []string{user1.Id, user2.Id}, - //}, - //{ - // name: "ListAccounts with multiple matches on on_premises_sam_account_name", - // query: "startswith(on_premises_sam_account_name,'user*')", - // expectedIDs: []string{user1.Id, user2.Id}, - //}, - } - - cl := proto.NewAccountsService("com.owncloud.api.accounts", service.Client()) - - for _, scenario := range scenarios { - t.Run(scenario.name, func(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - req := &proto.ListAccountsRequest{Query: scenario.query} - res, err := cl.ListAccounts(context.Background(), req) - assert.NoError(t, err) - ids := make([]string, 0) - for _, acc := range res.Accounts { - ids = append(ids, acc.Id) - } - assert.Equal(t, scenario.expectedIDs, ids) - cleanUp(t) - }) - } -} - -func TestGetAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - req := &proto.GetAccountRequest{Id: getAccount("user1").Id} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", service.Client()) - - resp, err := cl.GetAccount(context.Background(), req) - - assert.NoError(t, err) - assert.IsType(t, &proto.Account{}, resp) - assertAccountsSame(t, getAccount("user1"), resp) - - cleanUp(t) -} - -//TODO: This segfaults! WIP - -func TestDeleteAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - req := &proto.DeleteAccountRequest{Id: getAccount("user1").Id} - - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - resp, err := cl.DeleteAccount(context.Background(), req) - assert.NoError(t, err) - assert.IsType(t, resp, &empty.Empty{}) - - // Check the account doesn't exists anymore - accountList, _ := listAccounts(t) - assertResponseContainsUser(t, accountList, getAccount("user2")) - assertResponseNotContainsUser(t, accountList, getAccount("user1")) - - cleanUp(t) -} - -func TestListGroups(t *testing.T) { - req := &proto.ListGroupsRequest{} - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - resp, err := cl.ListGroups(context.Background(), req) - assert.NoError(t, err) - assert.IsType(t, &proto.ListGroupsResponse{}, resp) - assert.Equal(t, 9, len(resp.Groups)) - - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - for _, g := range groups { - assertResponseContainsGroup(t, resp, getGroup(g)) - } - cleanUp(t) -} - -func TestGetGroups(t *testing.T) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - for _, g := range groups { - group := getGroup(g) - req := &proto.GetGroupRequest{Id: group.Id} - resp, err := cl.GetGroup(context.Background(), req) - - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, resp) - assertGroupsSame(t, group, resp) - } - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestCreateGroup(t *testing.T) { - group := &proto.Group{Id: "2d58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30042, OnPremisesSamAccountName: "quantum-group", DisplayName: "Quantum Group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - - res, err := createGroup(t, group) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - - // Should return the group but does not - // assertGroupsSame(t, res, group) - - groupsResponse := listGroups(t) - assertResponseContainsGroup(t, groupsResponse, group) - cleanUp(t) -} - -func TestGetGroupInvalidID(t *testing.T) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.GetGroupRequest{Id: "42"} - resp, err := cl.GetGroup(context.Background(), req) - - assert.IsType(t, &proto.Group{}, resp) - assert.Empty(t, resp) - assert.Error(t, err) - cleanUp(t) -} - -func TestDeleteGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - grp2 := getTestGroups("grp2") - grp3 := getTestGroups("grp3") - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createGroup(t, grp2) - assert.NoError(t, err) - _, err = createGroup(t, grp3) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteGroupRequest{Id: grp1.Id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, res, &empty.Empty{}) - assert.NoError(t, err) - - req = &proto.DeleteGroupRequest{Id: grp2.Id} - res, err = cl.DeleteGroup(context.Background(), req) - assert.IsType(t, res, &empty.Empty{}) - assert.NoError(t, err) - - groupsResponse := listGroups(t) - assertResponseNotContainsGroup(t, groupsResponse, grp1) - assertResponseNotContainsGroup(t, groupsResponse, grp2) - assertResponseContainsGroup(t, groupsResponse, grp3) - cleanUp(t) -} - -func TestDeleteGroupNotExisting(t *testing.T) { - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for _, id := range invalidIds { - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, &empty.Empty{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - cleanUp(t) -} - -func TestDeleteGroupInvalidId(t *testing.T) { - invalidIds := map[string]string{ - ".": ".", - "hello/world": "hello/world", - "/new-id": "/new-id", - "/new-id/": "/new-id", - "/0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059": "/0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - "": ".", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for id := range invalidIds { - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, &empty.Empty{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - cleanUp(t) -} - -func TestUpdateGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - updateGrp := &proto.Group{ - Id: grp1.Id, - } - - req := &proto.UpdateGroupRequest{Group: updateGrp} - - res, err := cl.UpdateGroup(context.Background(), req) - - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestAddMember(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - updatedGroup := grp1 - updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id}) - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.AddMember(context.Background(), req) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - - // Should return the group but returns empty - // assertGroupsSame(t, updatedGroup, res) - - resp := listGroups(t) - assertResponseContainsGroup(t, resp, updatedGroup) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/62 -func TestAddMemberAlreadyInGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - updatedGroup := grp1 - updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id}) - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - _, err = addMemberToGroup(t, grp1.Id, account.Id) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.AddMember(context.Background(), req) - - // Should Give Error - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, res) - //assert.Equal(t, proto.Group{}, *res) - //assertGroupsSame(t, updatedGroup, res) - - // Check the group is truly updated - resp := listGroups(t) - assertResponseContainsGroup(t, resp, updatedGroup) - - cleanUp(t) -} - -func TestAddMemberNonExisting(t *testing.T) { - grp1 := getTestGroups("grp1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - for _, id := range invalidIds { - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: id} - - res, err := cl.AddMember(context.Background(), req) - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - - cleanUp(t) -} - -func addMemberToGroup(t *testing.T, groupID, memberID string) (*proto.Group, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: groupID, AccountId: memberID} - - res, err := cl.AddMember(context.Background(), req) - - return res, err -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestRemoveMember(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - _, err = addMemberToGroup(t, grp1.Id, account.Id) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.RemoveMember(context.Background(), req) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - //assert.Equal(t, proto.Group{}, *res) - // assertGroupsSame(t, grp1, res) - - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - - cleanUp(t) -} - -func TestRemoveMemberNonExistingUser(t *testing.T) { - grp1 := getTestGroups("grp1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - for _, id := range invalidIds { - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: id} - - res, err := cl.RemoveMember(context.Background(), req) - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/62 -func TestRemoveMemberNotInGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.RemoveMember(context.Background(), req) - - // Should give an error - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, res) - - //assert.Error(t, err) - //assert.Equal( - // t, - // fmt.Sprintf("{\"id\":\".\",\"code\":404,\"detail\":\"User not found in the group\",\"status\":\"Not Found\"}", account.Id), - // err.Error(), - //) - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - cleanUp(t) -} - -func TestListMembers(t *testing.T) { - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for _, group := range groups { - expectedGroup := getGroup(group) - req := &proto.ListMembersRequest{Id: expectedGroup.Id} - - res, err := cl.ListMembers(context.Background(), req) - assert.NoError(t, err) - - assert.Equal(t, len(res.Members), len(expectedGroup.Members)) - - for _, member := range expectedGroup.Members { - found := false - for _, resMember := range res.Members { - if resMember.Id == member.Id { - found = true - break - } - } - - if !found { - t.Fatalf("Group with Id %v Expected to be in response but not found", member.Id) - } - } - } - cleanUp(t) -} - -func TestListMembersEmptyGroup(t *testing.T) { - group := &proto.Group{Id: "5d58e5ec-842e-498b-8800-61f2ec6f911c", GidNumber: 60000, OnPremisesSamAccountName: "quantum-group", DisplayName: "Quantum Group", Members: []*proto.Account{}} - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - request := &proto.CreateGroupRequest{Group: group} - _, err := cl.CreateGroup(context.Background(), request) - if err == nil { - newCreatedGroups = append(newCreatedGroups, group.Id) - } - - req := &proto.ListMembersRequest{Id: group.Id} - - listRes, err := cl.ListMembers(context.Background(), req) - - assert.NoError(t, err) - assert.Empty(t, listRes.Members) - - cleanUp(t) -} - -func TestAccountUpdateMask(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - user1 := getAccount("user1") - client := mgrpcc.NewClient() - req := &proto.UpdateAccountRequest{ - // We only want to update the display-name, rest should be ignored - UpdateMask: &field_mask.FieldMask{Paths: []string{"DisplayName"}}, - Account: &proto.Account{ - Id: user1.Id, - DisplayName: "ShouldBeUpdated", - PreferredName: "ShouldStaySame And Is Invalid Anyway", - }} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - res, err := cl.UpdateAccount(context.Background(), req) - assert.NoError(t, err) - - assert.Equal(t, "ShouldBeUpdated", res.DisplayName) - assert.Equal(t, user1.PreferredName, res.PreferredName) - - cleanUp(t) -} - -func TestAccountUpdateReadOnlyField(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - user1 := getAccount("user1") - client := mgrpcc.NewClient() - req := &proto.UpdateAccountRequest{ - // We only want to update the display-name, rest should be ignored - UpdateMask: &field_mask.FieldMask{Paths: []string{"CreatedDateTime"}}, - Account: &proto.Account{ - Id: user1.Id, - CreatedDateTime: timestamppb.Now(), - }} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - res, err := cl.UpdateAccount(context.Background(), req) - assert.Nil(t, res) - assert.Error(t, err) - - var e *merrors.Error - - if errors.As(err, &e) { - assert.EqualValues(t, 400, e.Code) - assert.Equal(t, "Bad Request", e.Status) - } else { - t.Fatal("Unexpected error type") - } - - cleanUp(t) -} diff --git a/accounts/pkg/proto/v0/accounts.pb.web.go b/accounts/pkg/proto/v0/accounts.pb.web.go deleted file mode 100644 index 139bee0dcb4..00000000000 --- a/accounts/pkg/proto/v0/accounts.pb.web.go +++ /dev/null @@ -1,1217 +0,0 @@ -// Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: proto.proto - -package proto - -import ( - "bytes" - "encoding/json" - "net/http" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/render" - "github.com/golang/protobuf/jsonpb" - - ptypesempty "github.com/golang/protobuf/ptypes/empty" -) - -type webAccountsServiceHandler struct { - r chi.Router - h AccountsServiceHandler -} - -func (h *webAccountsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webAccountsServiceHandler) ListAccounts(w http.ResponseWriter, r *http.Request) { - req := &ListAccountsRequest{} - resp := &ListAccountsResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListAccounts( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) GetAccount(w http.ResponseWriter, r *http.Request) { - req := &GetAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) CreateAccount(w http.ResponseWriter, r *http.Request) { - req := &CreateAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.CreateAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) UpdateAccount(w http.ResponseWriter, r *http.Request) { - req := &UpdateAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.UpdateAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) DeleteAccount(w http.ResponseWriter, r *http.Request) { - req := &DeleteAccountRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.DeleteAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func RegisterAccountsServiceWeb(r chi.Router, i AccountsServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webAccountsServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/accounts/accounts-list", handler.ListAccounts) - r.MethodFunc("POST", "/api/v0/accounts/accounts-get", handler.GetAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-create", handler.CreateAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-update", handler.UpdateAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-delete", handler.DeleteAccount) -} - -type webGroupsServiceHandler struct { - r chi.Router - h GroupsServiceHandler -} - -func (h *webGroupsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webGroupsServiceHandler) ListGroups(w http.ResponseWriter, r *http.Request) { - req := &ListGroupsRequest{} - resp := &ListGroupsResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListGroups( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) GetGroup(w http.ResponseWriter, r *http.Request) { - req := &GetGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) CreateGroup(w http.ResponseWriter, r *http.Request) { - req := &CreateGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.CreateGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) UpdateGroup(w http.ResponseWriter, r *http.Request) { - req := &UpdateGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.UpdateGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) DeleteGroup(w http.ResponseWriter, r *http.Request) { - req := &DeleteGroupRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.DeleteGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func (h *webGroupsServiceHandler) AddMember(w http.ResponseWriter, r *http.Request) { - req := &AddMemberRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.AddMember( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) RemoveMember(w http.ResponseWriter, r *http.Request) { - req := &RemoveMemberRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RemoveMember( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) ListMembers(w http.ResponseWriter, r *http.Request) { - req := &ListMembersRequest{} - resp := &ListMembersResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListMembers( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterGroupsServiceWeb(r chi.Router, i GroupsServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webGroupsServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/accounts/groups-list", handler.ListGroups) - r.MethodFunc("POST", "/api/v0/accounts/groups-get", handler.GetGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-create", handler.CreateGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-update", handler.UpdateGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-delete", handler.DeleteGroup) - r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/$ref", handler.AddMember) - r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/{account_id}/$ref", handler.RemoveMember) - r.MethodFunc("POST", "/api/v0/groups/{id=*}/members/$ref", handler.ListMembers) -} - -type webIndexServiceHandler struct { - r chi.Router - h IndexServiceHandler -} - -func (h *webIndexServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webIndexServiceHandler) RebuildIndex(w http.ResponseWriter, r *http.Request) { - req := &RebuildIndexRequest{} - resp := &RebuildIndexResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RebuildIndex( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterIndexServiceWeb(r chi.Router, i IndexServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webIndexServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/index/rebuild", handler.RebuildIndex) -} - -// RebuildIndexRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RebuildIndexRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RebuildIndexRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RebuildIndexRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RebuildIndexRequest)(nil) - -// RebuildIndexRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RebuildIndexRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RebuildIndexRequest) UnmarshalJSON(b []byte) error { - return RebuildIndexRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RebuildIndexRequest)(nil) - -// RebuildIndexResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RebuildIndexResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RebuildIndexResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RebuildIndexResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RebuildIndexResponse)(nil) - -// RebuildIndexResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RebuildIndexResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RebuildIndexResponse) UnmarshalJSON(b []byte) error { - return RebuildIndexResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RebuildIndexResponse)(nil) - -// ListAccountsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListAccountsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListAccountsRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListAccountsRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListAccountsRequest)(nil) - -// ListAccountsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListAccountsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListAccountsRequest) UnmarshalJSON(b []byte) error { - return ListAccountsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListAccountsRequest)(nil) - -// ListAccountsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListAccountsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListAccountsResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListAccountsResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListAccountsResponse)(nil) - -// ListAccountsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListAccountsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListAccountsResponse) UnmarshalJSON(b []byte) error { - return ListAccountsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListAccountsResponse)(nil) - -// GetAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetAccountRequest)(nil) - -// GetAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetAccountRequest) UnmarshalJSON(b []byte) error { - return GetAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetAccountRequest)(nil) - -// CreateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of CreateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *CreateAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := CreateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*CreateAccountRequest)(nil) - -// CreateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of CreateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *CreateAccountRequest) UnmarshalJSON(b []byte) error { - return CreateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*CreateAccountRequest)(nil) - -// UpdateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of UpdateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *UpdateAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := UpdateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*UpdateAccountRequest)(nil) - -// UpdateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of UpdateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *UpdateAccountRequest) UnmarshalJSON(b []byte) error { - return UpdateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*UpdateAccountRequest)(nil) - -// DeleteAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of DeleteAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *DeleteAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := DeleteAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*DeleteAccountRequest)(nil) - -// DeleteAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of DeleteAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *DeleteAccountRequest) UnmarshalJSON(b []byte) error { - return DeleteAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*DeleteAccountRequest)(nil) - -// AccountJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Account. This struct is safe to replace or modify but -// should not be done so concurrently. -var AccountJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Account) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AccountJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Account)(nil) - -// AccountJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Account. This struct is safe to replace or modify but -// should not be done so concurrently. -var AccountJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Account) UnmarshalJSON(b []byte) error { - return AccountJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Account)(nil) - -// IdentitiesJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Identities. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentitiesJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Identities) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := IdentitiesJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Identities)(nil) - -// IdentitiesJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Identities. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentitiesJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Identities) UnmarshalJSON(b []byte) error { - return IdentitiesJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Identities)(nil) - -// PasswordProfileJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of PasswordProfile. This struct is safe to replace or modify but -// should not be done so concurrently. -var PasswordProfileJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *PasswordProfile) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := PasswordProfileJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*PasswordProfile)(nil) - -// PasswordProfileJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of PasswordProfile. This struct is safe to replace or modify but -// should not be done so concurrently. -var PasswordProfileJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *PasswordProfile) UnmarshalJSON(b []byte) error { - return PasswordProfileJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*PasswordProfile)(nil) - -// ListGroupsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListGroupsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListGroupsRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListGroupsRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListGroupsRequest)(nil) - -// ListGroupsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListGroupsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListGroupsRequest) UnmarshalJSON(b []byte) error { - return ListGroupsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListGroupsRequest)(nil) - -// ListGroupsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListGroupsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListGroupsResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListGroupsResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListGroupsResponse)(nil) - -// ListGroupsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListGroupsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListGroupsResponse) UnmarshalJSON(b []byte) error { - return ListGroupsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListGroupsResponse)(nil) - -// GetGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetGroupRequest)(nil) - -// GetGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetGroupRequest) UnmarshalJSON(b []byte) error { - return GetGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetGroupRequest)(nil) - -// CreateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of CreateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *CreateGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := CreateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*CreateGroupRequest)(nil) - -// CreateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of CreateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *CreateGroupRequest) UnmarshalJSON(b []byte) error { - return CreateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*CreateGroupRequest)(nil) - -// UpdateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of UpdateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *UpdateGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := UpdateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*UpdateGroupRequest)(nil) - -// UpdateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of UpdateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *UpdateGroupRequest) UnmarshalJSON(b []byte) error { - return UpdateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*UpdateGroupRequest)(nil) - -// DeleteGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of DeleteGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *DeleteGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := DeleteGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*DeleteGroupRequest)(nil) - -// DeleteGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of DeleteGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *DeleteGroupRequest) UnmarshalJSON(b []byte) error { - return DeleteGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*DeleteGroupRequest)(nil) - -// AddMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AddMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddMemberRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AddMemberRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AddMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AddMemberRequest)(nil) - -// AddMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AddMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AddMemberRequest) UnmarshalJSON(b []byte) error { - return AddMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AddMemberRequest)(nil) - -// RemoveMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RemoveMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveMemberRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RemoveMemberRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RemoveMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RemoveMemberRequest)(nil) - -// RemoveMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RemoveMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RemoveMemberRequest) UnmarshalJSON(b []byte) error { - return RemoveMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RemoveMemberRequest)(nil) - -// ListMembersRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListMembersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListMembersRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListMembersRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListMembersRequest)(nil) - -// ListMembersRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListMembersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListMembersRequest) UnmarshalJSON(b []byte) error { - return ListMembersRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListMembersRequest)(nil) - -// ListMembersResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListMembersResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListMembersResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListMembersResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListMembersResponse)(nil) - -// ListMembersResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListMembersResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListMembersResponse) UnmarshalJSON(b []byte) error { - return ListMembersResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListMembersResponse)(nil) - -// GroupJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Group. This struct is safe to replace or modify but -// should not be done so concurrently. -var GroupJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Group) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GroupJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Group)(nil) - -// GroupJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Group. This struct is safe to replace or modify but -// should not be done so concurrently. -var GroupJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Group) UnmarshalJSON(b []byte) error { - return GroupJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Group)(nil) - -// OnPremisesProvisioningErrorJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but -// should not be done so concurrently. -var OnPremisesProvisioningErrorJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *OnPremisesProvisioningError) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := OnPremisesProvisioningErrorJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*OnPremisesProvisioningError)(nil) - -// OnPremisesProvisioningErrorJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but -// should not be done so concurrently. -var OnPremisesProvisioningErrorJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *OnPremisesProvisioningError) UnmarshalJSON(b []byte) error { - return OnPremisesProvisioningErrorJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*OnPremisesProvisioningError)(nil) diff --git a/accounts/pkg/proto/v0/accounts.swagger.json b/accounts/pkg/proto/v0/accounts.swagger.json deleted file mode 100644 index 4f02b5ff250..00000000000 --- a/accounts/pkg/proto/v0/accounts.swagger.json +++ /dev/null @@ -1,1067 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ownCloud Infinite Scale accounts", - "version": "1.0.0", - "contact": { - "name": "ownCloud GmbH", - "url": "https://github.com/owncloud/ocis", - "email": "support@owncloud.com" - }, - "license": { - "name": "Apache-2.0", - "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "AccountsService" - }, - { - "name": "GroupsService" - }, - { - "name": "IndexService" - } - ], - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v0/accounts/accounts-create": { - "post": { - "summary": "Creates an account", - "operationId": "AccountsService_CreateAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0CreateAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-delete": { - "post": { - "summary": "Deletes an account", - "operationId": "AccountsService_DeleteAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0DeleteAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-get": { - "post": { - "summary": "Gets an account", - "operationId": "AccountsService_GetAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-list": { - "post": { - "summary": "Lists accounts", - "operationId": "AccountsService_ListAccounts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListAccountsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListAccountsRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-update": { - "post": { - "summary": "Updates an account", - "operationId": "AccountsService_UpdateAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0UpdateAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/groups-create": { - "post": { - "summary": "Creates a group", - "operationId": "GroupsService_CreateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0CreateGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-delete": { - "post": { - "summary": "Deletes a group", - "operationId": "GroupsService_DeleteGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0DeleteGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-get": { - "post": { - "summary": "Gets an groups", - "operationId": "GroupsService_GetGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-list": { - "post": { - "summary": "Lists groups", - "operationId": "GroupsService_ListGroups", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListGroupsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListGroupsRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-update": { - "post": { - "summary": "Updates a group", - "operationId": "GroupsService_UpdateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0UpdateGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{groupId}/members/$ref": { - "post": { - "summary": "group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0\u0026tabs=http", - "operationId": "GroupsService_AddMember", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "groupId", - "description": "The id of the group to add a member to", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "accountId": { - "type": "string", - "title": "The account id to add" - } - } - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{groupId}/members/{accountId}/$ref": { - "post": { - "summary": "group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0", - "operationId": "GroupsService_RemoveMember", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "groupId", - "description": "The id of the group to remove a member from", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "accountId", - "description": "The account id to remove", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{id}/members/$ref": { - "post": { - "summary": "group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0", - "operationId": "GroupsService_ListMembers", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListMembersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "The id of the group to list members from", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" - } - } - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/index/rebuild": { - "post": { - "operationId": "IndexService_RebuildIndex", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0RebuildIndexResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0RebuildIndexRequest" - } - } - ], - "tags": [ - "IndexService" - ] - } - } - }, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v0Account": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only." - }, - "accountEnabled": { - "type": "boolean", - "description": "*true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter." - }, - "isResourceAccount": { - "type": "boolean", - "description": "A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general.\nIn Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number.\nYou could give printers or machines with a sync client resource accounts as well.\nA resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019.\n*true* if the user is a resource account; otherwise, *false*. Null value should be considered false." - }, - "creationType": { - "type": "string", - "description": "Indicates whether the account was created as\n- a regular school or work account (\"\" / emptystring),\n- a local account, fully managed by oCIS (LocalAccount), includes synced accounts or\n- an external account (Invitation),\n- self-service sign-up using email verification (EmailVerified). Read-only." - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Identities" - }, - "description": "Represents the identities that can be used to sign in to this account.\nAn identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account.\nMay contain multiple items with the same signInType value. Supports $filter." - }, - "displayName": { - "type": "string", - "title": "The name displayed in the address book for the account.\nThis is usually the combination of the user's first name, middle initial and last name.\nThis property is required when a user is created and it cannot be cleared during updates.\nSupports $filter and $orderby.\nposixaccount MUST cn" - }, - "preferredName": { - "type": "string", - "title": "The username\nposixaccount MUST uid" - }, - "uidNumber": { - "type": "string", - "format": "int64", - "title": "TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users\nused for exposing the user using ldap\nposixaccount MUST uidnumber" - }, - "gidNumber": { - "type": "string", - "format": "int64", - "title": "used for exposing the user using ldap\nposixaccount MUST gidnumber" - }, - "mail": { - "type": "string", - "title": "The SMTP address for the user, for example, \"jeff@contoso.onmicrosoft.com\". Read-Only. Supports $filter.\ninetorgperson MAY mail" - }, - "description": { - "type": "string", - "title": "A description, useful for resource accounts\nposixaccount MAY description" - }, - "passwordProfile": { - "$ref": "#/definitions/v0PasswordProfile", - "title": "Specifies the password profile for the user.\nThe profile contains the user’s password. This property is required when a user is created.\nThe password in the profile must satisfy minimum requirements as specified by the passwordPolicies property.\nBy default, a strong password is required.\nposixaccount MAY authPassword" - }, - "memberOf": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Group" - }, - "title": "The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable.\nshould we only respond with repeated strings of ids? no clients should a proper filter mask!" - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "The created date of the account object." - }, - "deletedDateTime": { - "type": "string", - "format": "date-time", - "description": "The date and time the user was deleted. Returned only on $select." - }, - "onPremisesSyncEnabled": { - "type": "boolean", - "title": "*true* if this object is synced from an on-premises directory;\n*false* if this object was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default). Read-only" - }, - "onPremisesImmutableId": { - "type": "string", - "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." - }, - "onPremisesSecurityIdentifier": { - "type": "string", - "description": "Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only." - }, - "onPremisesDistinguishedName": { - "type": "string", - "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesSamAccountName": { - "type": "string", - "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesDomainName": { - "type": "string", - "description": "Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesUserPrincipalName": { - "type": "string", - "description": "Contains the on-premises userPrincipalName synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesLastSyncDateTime": { - "type": "string", - "format": "date-time", - "description": "Indicates the last time at which the object was synced with the on-premises directory; Read-only." - }, - "onPremisesProvisioningErrors": { - "type": "array", - "items": { - "$ref": "#/definitions/v0OnPremisesProvisioningError" - }, - "description": "Errors when using synchronization during provisioning." - }, - "externalUserState": { - "type": "string", - "description": "For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status.\nFor invited users, the state can be `PendingAcceptance` or `Accepted`, or \"\" / emptystring for all other users.\nReturned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'." - }, - "externalUserStateChangeDateTime": { - "type": "string", - "format": "date-time", - "description": "Shows the timestamp for the latest change to the externalUserState property. Returned only on $select." - }, - "refreshTokensValidFromDateTime": { - "type": "string", - "format": "date-time", - "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nReturned only on $select. Read-only. Use invalidateAllRefreshTokens to reset." - }, - "signInSessionsValidFromDateTime": { - "type": "string", - "format": "date-time", - "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nRead-only. Use revokeSignInSessions to reset." - } - }, - "title": "Account follows the properties of the ms graph api user resource.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties" - }, - "v0CreateAccountRequest": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/v0Account", - "title": "The account resource to create" - } - } - }, - "v0CreateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v0Group", - "title": "The account resource to create" - } - } - }, - "v0DeleteAccountRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0DeleteGroupRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0GetAccountRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0GetGroupRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0Group": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the group.\nReturned by default. Inherited from directoryObject. Key. Not nullable. Read-only." - }, - "displayName": { - "type": "string", - "title": "The display name for the group. This property is required when a group is created and cannot be cleared during updates.\nReturned by default. Supports $filter and $orderby.\ngroupofnames MUST cn" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable.\nTODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later" - }, - "owners": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "groupofnames MAY businessCategory\ngroupofnames MAY o\ngroupofnames MAY ou\ngroupofnames MAY owner, SINGLE-VALUE but there might be multiple owners" - }, - "description": { - "type": "string", - "title": "An optional description for the group. Returned by default.\ngroupofnames MAY description" - }, - "gidNumber": { - "type": "string", - "format": "int64", - "title": "used for exposing the user using ldap\nposixgroup MUST gidnumber" - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created\nReturned by default. Read-only." - }, - "deletedDateTime": { - "type": "string", - "format": "date-time", - "description": "For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null.\nReturned by default. Read-only." - }, - "expirationDateTime": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created.\nReturned by default. Read-only." - }, - "hideFromAddressLists": { - "type": "boolean", - "description": "True if the group is not displayed in certain parts of the Outlook user interface:\nin the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false.\nReturned only on $select." - }, - "visibility": { - "type": "string", - "description": "Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more.\nVisibility can be set only when a group is created; it is not editable.\nReturned by default." - }, - "onPremisesSyncEnabled": { - "type": "boolean", - "description": "*true* if this group is synced from an on-premises directory;\n*false* if this group was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default).\nReturned by default. Read-only. Supports $filter." - }, - "onPremisesImmutableId": { - "type": "string", - "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." - }, - "onPremisesSecurityIdentifier": { - "type": "string", - "description": "Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only." - }, - "onPremisesDistinguishedName": { - "type": "string", - "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesSamAccountName": { - "type": "string", - "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only." - }, - "onPremisesDomainName": { - "type": "string", - "description": "Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." - }, - "onPremisesNetBiosName": { - "type": "string", - "description": "Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." - }, - "onPremisesLastSyncDateTime": { - "type": "string", - "description": "Indicates the last time at which the group was synced with the on-premises directory.\nReturned by default. Read-only. Supports $filter." - }, - "onPremisesProvisioningErrors": { - "type": "array", - "items": { - "$ref": "#/definitions/v0OnPremisesProvisioningError" - }, - "description": "Errors when using synchronization during provisioning." - } - } - }, - "v0Identities": { - "type": "object", - "properties": { - "signInType": { - "type": "string", - "description": "Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`.\nHere, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer.\nAdditional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`.\nThis property can also be set to any custom string." - }, - "issuer": { - "type": "string", - "description": "Specifies the issuer of the identity, for example facebook.com.\nFor local accounts (where signInType is not federated), this property is\nthe local B2C tenant default domain name, for example contoso.onmicrosoft.com.\nFor external users from other Azure AD organization, this will be the domain of\nthe federated organization, for example contoso.com.\nSupports $filter. 512 character limit." - }, - "issuerAssignedId": { - "type": "string", - "description": "Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).\nWhen *signInType* is set to:\n* `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address\n* `userName`, issuer_assigned_id must be a valid local part of an email address\nSupports $filter. 512 character limit." - } - }, - "description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames." - }, - "v0ListAccountsRequest": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32", - "title": "Optional. The maximum number of accounts to return in the response" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `email=foo@example.com` returns accounts with\n`email` set to `foo@example.com`\n* Query `display_name=\\\\\"Test String\\\\\"` returns accounts with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the accounts to return.\nIf no search criteria is specified then all accounts will be\nreturned" - } - } - }, - "v0ListAccountsResponse": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "The field name should match the noun \"accounts\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0ListGroupsRequest": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32", - "title": "Optional. The maximum number of groups to return in the response" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" - } - } - }, - "v0ListGroupsResponse": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Group" - }, - "title": "The field name should match the noun \"group\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0ListMembersResponse": { - "type": "object", - "properties": { - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "The field name should match the noun \"members\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0OnPremisesProvisioningError": { - "type": "object", - "properties": { - "category": { - "type": "string", - "description": "Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property." - }, - "occurredDateTime": { - "type": "string", - "format": "date-time", - "description": "The date and time at which the error occurred." - }, - "propertyCausingError": { - "type": "string", - "title": "Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress" - }, - "value": { - "type": "string", - "description": "Value of the property causing the error." - } - } - }, - "v0PasswordProfile": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "The password for the user. This property is required when a user is created.\nIt can be updated, but the user will be required to change the password on the next login.\nThe password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required." - }, - "lastPasswordChangeDateTime": { - "type": "string", - "format": "date-time", - "description": "The time when this account last changed their password." - }, - "passwordPolicies": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Specifies password policies for the user.\nThis value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified.\n“DisablePasswordExpiration” can also be specified." - }, - "forceChangePasswordNextSignIn": { - "type": "boolean", - "description": "*true* if the user must change her password on the next login; otherwise false." - }, - "forceChangePasswordNextSignInWithMfa": { - "type": "boolean", - "description": "If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false." - } - } - }, - "v0RebuildIndexRequest": { - "type": "object" - }, - "v0RebuildIndexResponse": { - "type": "object" - }, - "v0UpdateAccountRequest": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/v0Account", - "title": "The account resource which replaces the resource on the server" - }, - "updateMask": { - "type": "string", - "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" - } - } - }, - "v0UpdateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v0Group", - "title": "The group resource which replaces the resource on the server" - }, - "updateMask": { - "type": "string", - "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" - } - } - } - }, - "externalDocs": { - "description": "Developer Manual", - "url": "https://owncloud.dev/extensions/accounts/" - } -} diff --git a/accounts/proto/v0/accounts.proto b/accounts/proto/v0/accounts.proto deleted file mode 100644 index 3a52b5648ef..00000000000 --- a/accounts/proto/v0/accounts.proto +++ /dev/null @@ -1,697 +0,0 @@ -syntax = "proto3"; - -package com.owncloud.ocis.accounts.v0; - -option go_package = "github.com/owncloud/ocis/accounts/pkg/proto/v0;proto"; - -import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -import "protoc-gen-openapiv2/options/annotations.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "ownCloud Infinite Scale accounts"; - version: "1.0.0"; - contact: { - name: "ownCloud GmbH"; - url: "https://github.com/owncloud/ocis"; - email: "support@owncloud.com"; - }; - license: { - name: "Apache-2.0"; - url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; - }; - }; - schemes: HTTP; - schemes: HTTPS; - consumes: "application/json"; - produces: "application/json"; - external_docs: { - description: "Developer Manual"; - url: "https://owncloud.dev/extensions/accounts/"; - }; -}; - -// Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods -// https://cloud.google.com/apis/design/standard_methods?hl=de#list -// https://cloud.google.com/apis/design/naming_convention?hl=de -service AccountsService { - // Lists accounts - rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { - // List method maps to HTTP GET - option (google.api.http) = { - post: "/api/v0/accounts/accounts-list", - body: "*" - }; - } - // Gets an account - rpc GetAccount(GetAccountRequest) returns (Account) { - option (google.api.http) = { - post: "/api/v0/accounts/accounts-get", - body: "*" - }; - } - // Creates an account - rpc CreateAccount(CreateAccountRequest) returns (Account) { - // Create maps to HTTP POST. URL path as the collection name. - // HTTP request body contains the resource - option (google.api.http) = { - post: "/api/v0/accounts/accounts-create" - body: "*" - }; - } - // Updates an account - rpc UpdateAccount(UpdateAccountRequest) returns (Account) { - // Update maps to HTTP PATCH. Resource name is mapped to a URL path. - // Resource is contained in the HTTP request body - option (google.api.http) = { - post: "/api/v0/accounts/accounts-update" - body: "*" - }; - }; - // Deletes an account - rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { - // Delete maps to HTTP DELETE. Resource name maps to the URL path. - // There is no request body - option (google.api.http) = { - post: "/api/v0/accounts/accounts-delete", - body: "*" - }; - } -} - -service GroupsService { - // Lists groups - rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { - // List method maps to HTTP GET - option (google.api.http) = { - post: "/api/v0/accounts/groups-list", - body: "*" - }; - } - // Gets an groups - rpc GetGroup(GetGroupRequest) returns (Group) { - option (google.api.http) = { - post: "/api/v0/accounts/groups-get", - body: "*" - }; - } - // Creates a group - rpc CreateGroup(CreateGroupRequest) returns (Group) { - // Create maps to HTTP POST. URL path as the collection name. - // HTTP request body contains the resource - option (google.api.http) = { - post: "/api/v0/accounts/groups-create" - body: "*" - }; - } - // Updates a group - rpc UpdateGroup(UpdateGroupRequest) returns (Group) { - // Update maps to HTTP PATCH. Resource name is mapped to a URL path. - // Resource is contained in the HTTP request body - option (google.api.http) = { - post: "/api/v0/accounts/groups-update" - body: "*" - }; - }; - // Deletes a group - rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { - // Delete maps to HTTP DELETE. Resource name maps to the URL path. - // There is no request body - option (google.api.http) = { - post: "/api/v0/accounts/groups-delete", - body: "*" - }; - } - - // additional group methods: https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#methods - - // references are accessed using $ref, see http://docs.oasis-open.org/odata/odata/v4.0/cs01/part2-url-conventions/odata-v4.0-cs01-part2-url-conventions.html#_Toc365046422 - // or the stack overflow question https://stackoverflow.com/questions/49362894/why-is-the-microsoft-graph-api-using-ref-in-the-uri - - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - rpc AddMember(AddMemberRequest) returns (Group) { - // All request parameters go into body. - option (google.api.http) = { - post: "/api/v0/groups/{group_id=*}/members/$ref" - body: "*" - }; - } - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - rpc RemoveMember(RemoveMemberRequest) returns (Group) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/groups/{group_id=*}/members/{account_id}/$ref" - body: "*" - }; - } - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - rpc ListMembers(ListMembersRequest) returns (ListMembersResponse) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/groups/{id=*}/members/$ref" - body: "*" - }; - } - -} - -service IndexService { - rpc RebuildIndex(RebuildIndexRequest) returns (RebuildIndexResponse) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/index/rebuild" - body: "*" - }; - } -} - -message RebuildIndexRequest { -} - -message RebuildIndexResponse { -} - -message ListAccountsRequest { - // Optional. The maximum number of accounts to return in the response - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the accounts to return. - // If no search criteria is specified then all accounts will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `email=foo@example.com` returns accounts with - // `email` set to `foo@example.com` - // * Query `display_name=\\"Test String\\"` returns accounts with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListAccountsResponse { - // The field name should match the noun "accounts" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Account accounts = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message GetAccountRequest { - string id = 1; -} - -message CreateAccountRequest { - // The account resource to create - Account account = 1; -} - -message UpdateAccountRequest { - // The account resource which replaces the resource on the server - Account account = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; - } - -message DeleteAccountRequest { - string id = 1; -} - -// Account follows the properties of the ms graph api user resource. -// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties -message Account { - - // Note that field numbers in the range 1 through 15 take one byte to encode, including the field number and the field's type - - // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. - string id = 1; - - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. - bool account_enabled = 2; - - // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. - // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. - // You could give printers or machines with a sync client resource accounts as well. - // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. - bool is_resource_account = 3; - - // Indicates whether the account was created as - // - a regular school or work account ("" / emptystring), - // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - // - an external account (Invitation), - // - self-service sign-up using email verification (EmailVerified). Read-only. - string creation_type = 4; - - // Represents the identities that can be used to sign in to this account. - // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. - // May contain multiple items with the same signInType value. Supports $filter. - repeated Identities identities = 5; - - // posixaccount properties - - // The name displayed in the address book for the account. - // This is usually the combination of the user's first name, middle initial and last name. - // This property is required when a user is created and it cannot be cleared during updates. - // Supports $filter and $orderby. - // posixaccount MUST cn - string display_name = 6; - - // The username - // posixaccount MUST uid - string preferred_name = 7; - - // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users - // used for exposing the user using ldap - // posixaccount MUST uidnumber - int64 uid_number = 8; - - // used for exposing the user using ldap - // posixaccount MUST gidnumber - int64 gid_number = 9; - - // posixaccount MUST homedirectory - // constructed dynamically in glauth - - // posixaccount MAY loginshell - // posixaccount MAY gecos - - // For the GECOS field: - // - User's full name (or application name, if the account is for a program) -> displayname (description) - // - Building and room number or contact person -> - - // - Office telephone number -> - - // - Any other contact information (pager number, fax, etc.) -> mail - // eg "Albert Einstein (Beware! I'm doing science!),,,einstein@example.com" as the gecos - - // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. - // inetorgperson MAY mail - string mail = 10; - - // A description, useful for resource accounts - // posixaccount MAY description - string description = 11; - - // Specifies the password profile for the user. - // The profile contains the user’s password. This property is required when a user is created. - // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. - // By default, a strong password is required. - // posixaccount MAY authPassword - PasswordProfile password_profile = 12; - - // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. - // should we only respond with repeated strings of ids? no clients should a proper filter mask! - repeated Group memberOf = 13; - - // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. - - // The created date of the account object. - google.protobuf.Timestamp created_date_time = 16; - - // The date and time the user was deleted. Returned only on $select. - google.protobuf.Timestamp deleted_date_time = 17; - - // properties for sync - - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). Read-only - bool on_premises_sync_enabled = 20; - - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - string on_premises_immutable_id = 21; - - // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. - string on_premises_security_identifier = 22; - - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_distinguished_name = 23; - - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_sam_account_name = 24; - - // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_domain_name = 25; - - // Contains the on-premises userPrincipalName synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_user_principal_name = 26; - - // Contains extensionAttributes 1-15 for the user. Note that the individual extension attributes are neither selectable nor filterable. - // For an onPremisesSyncEnabled user, this set of properties is mastered on-premises and is read-only. - // For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update. - //onPremisesExtensionAttributes onPremisesExtensionAttributes = 27 - - // Indicates the last time at which the object was synced with the on-premises directory; Read-only. - google.protobuf.Timestamp on_premises_last_sync_date_time = 28; - - // Errors when using synchronization during provisioning. - repeated OnPremisesProvisioningError on_premises_provisioning_errors = 29; - - // TODO do we need to sync uidnumber and gidnumber from the external ldap? we may assign different numbers so eos has a non colliding namespace. - // we can sync them to the (uid|gid)_number fields but what if they changed in the external ldap and now collide? - // move those properties to a posixaccount message so we can exchange that part with an external (readonly or writeable) ldap server? - - // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. - // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. - // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. - string external_user_state = 40; - - // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. - google.protobuf.Timestamp external_user_state_change_date_time = 41; - - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. - google.protobuf.Timestamp refresh_tokens_valid_from_date_time = 60; - - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Read-only. Use revokeSignInSessions to reset. - google.protobuf.Timestamp sign_in_sessions_valid_from_date_time = 61; -} - -// Identities Represents an identity used to sign in to a user account. -// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. -// This enables the user to sign in to the user account with any of those associated identities. -// They are also used to keep a history of old usernames. -message Identities { - // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. - // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. - // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. - // This property can also be set to any custom string. - string sign_in_type = 1; - - // Specifies the issuer of the identity, for example facebook.com. - // For local accounts (where signInType is not federated), this property is - // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. - // For external users from other Azure AD organization, this will be the domain of - // the federated organization, for example contoso.com. - // Supports $filter. 512 character limit. - string issuer = 2; - - // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). - // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address - // * `userName`, issuer_assigned_id must be a valid local part of an email address - // Supports $filter. 512 character limit. - string issuer_assigned_id = 3; -} -message PasswordProfile { - // The password for the user. This property is required when a user is created. - // It can be updated, but the user will be required to change the password on the next login. - // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. - string password = 1; - - // The time when this account last changed their password. - google.protobuf.Timestamp last_password_change_date_time = 2; - - // Specifies password policies for the user. - //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. - // “DisablePasswordExpiration” can also be specified. - repeated string password_policies = 3; - - // *true* if the user must change her password on the next login; otherwise false. - bool force_change_password_next_sign_in = 4; - - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - bool force_change_password_next_sign_in_with_mfa = 5; -} - -message ListGroupsRequest { - // Optional. The maximum number of groups to return in the response - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListGroupsResponse { - // The field name should match the noun "group" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Group groups = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message GetGroupRequest { - string id = 1; -} - -message CreateGroupRequest { - // The account resource to create - Group group = 1; -} - -message UpdateGroupRequest { - // The group resource which replaces the resource on the server - Group group = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; - } - -message DeleteGroupRequest { - string id = 1; -} - -message AddMemberRequest { - // The id of the group to add a member to - string group_id = 1; - // The account id to add - string account_id = 2; -} - -message RemoveMemberRequest { - // The id of the group to remove a member from - string group_id = 1; - // The account id to remove - string account_id = 2; -} - -message ListMembersRequest { - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; - - // The id of the group to list members from - string id = 5; -} - -message ListMembersResponse { - // The field name should match the noun "members" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Account members = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message Group { - - // The unique identifier for the group. - // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. - string id = 1; - - // groupofnames - - // The display name for the group. This property is required when a group is created and cannot be cleared during updates. - // Returned by default. Supports $filter and $orderby. - // groupofnames MUST cn - string display_name = 2; - // groupofnames MUST/MAY member - - // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. - // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later - repeated Account members = 3; - - // groupofnames MAY businessCategory - // groupofnames MAY o - // groupofnames MAY ou - // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners - repeated Account owners = 4; - - // An optional description for the group. Returned by default. - // groupofnames MAY description - string description = 5; - - // groupofnames MAY seeAlso - - // posixgroup - - // used for exposing the user using ldap - // posixgroup MUST gidnumber - int64 gid_number = 6; - // posixgroup MAY authPassword - // posixgroup MAY userPassword - // posixgroup MAY memberUid -> groupofnames member - // posixgroup MAY description -> groupofnames - - - // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created - // Returned by default. Read-only. - google.protobuf.Timestamp created_date_time = 7; - - // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. - // Returned by default. Read-only. - google.protobuf.Timestamp deleted_date_time = 8; - - // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. - // Returned by default. Read-only. - google.protobuf.Timestamp expiration_date_time = 9; - - // True if the group is not displayed in certain parts of the Outlook user interface: - // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. - // Returned only on $select. - bool hide_from_address_lists = 10; - - // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. - // Visibility can be set only when a group is created; it is not editable. - // Returned by default. - string visibility = 11; - - // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. - - // properties for sync - - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). - // Returned by default. Read-only. Supports $filter. - bool on_premises_sync_enabled = 20; - - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - string on_premises_immutable_id = 21; - - // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. - string on_premises_security_identifier = 22; - - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_distinguished_name = 23; - - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. - string on_premises_sam_account_name = 24; - - // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - string on_premises_domain_name = 25; - - // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - string on_premises_net_bios_name = 26; - - // Indicates the last time at which the group was synced with the on-premises directory. - // Returned by default. Read-only. Supports $filter. - string on_premises_last_sync_date_time = 27; - - // Errors when using synchronization during provisioning. - repeated OnPremisesProvisioningError on_premises_provisioning_errors = 28; -} - -message OnPremisesProvisioningError { - // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. - string category = 1; - // The date and time at which the error occurred. - google.protobuf.Timestamp occurred_date_time = 2; - // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress - string property_causing_error = 3; - // Value of the property causing the error. - string value = 4; -} From eb78b80f1886eb8f762f6efc2dbd076a3aa3ca90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Fri, 17 Dec 2021 12:52:23 +0100 Subject: [PATCH 04/20] Include missing swagger info to the accounts service --- .../ocis/services/accounts/v1/grpc.md | 6 ++-- .../ocis/services/accounts/v1/accounts.pb.go | 36 +++++++++++++++---- .../services/accounts/v1/accounts.pb.micro.go | 7 +--- .../accounts/v1/accounts.swagger.json | 27 +++++++++++--- protogen/proto/buf.lock | 7 ++++ protogen/proto/buf.yaml | 1 + .../ocis/services/accounts/v1/accounts.proto | 29 +++++++++++++-- 7 files changed, 89 insertions(+), 24 deletions(-) diff --git a/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md b/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md index 45a66887e67..5118f5588d6 100644 --- a/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md +++ b/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md @@ -202,9 +202,9 @@ https://cloud.google.com/apis/design/naming_convention?hl=de | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| | ListAccounts | [ListAccountsRequest](#listaccountsrequest) | [ListAccountsResponse](#listaccountsresponse) | Lists accounts | -| GetAccount | [GetAccountRequest](#getaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Gets an account rpc GetAccount(GetAccountRequest) returns (Account) { | -| CreateAccount | [CreateAccountRequest](#createaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Creates an account rpc CreateAccount(CreateAccountRequest) returns (Account) { | -| UpdateAccount | [UpdateAccountRequest](#updateaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Updates an account rpc UpdateAccount(UpdateAccountRequest) returns (Account) { | +| GetAccount | [GetAccountRequest](#getaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Gets an account | +| CreateAccount | [CreateAccountRequest](#createaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Creates an account | +| UpdateAccount | [UpdateAccountRequest](#updateaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Updates an account | | DeleteAccount | [DeleteAccountRequest](#deleteaccountrequest) | [.google.protobuf.Empty](#googleprotobufempty) | Deletes an account | ### GroupsService diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go index 1a4389c67f5..ef51603939b 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go @@ -7,6 +7,7 @@ package v1 import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -1103,7 +1104,10 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 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, 0x22, 0x15, 0x0a, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 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, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, 0x01, 0x0a, @@ -1343,12 +1347,30 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x66, 0x61, 0x6e, 0x65, 0x7a, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x30, 0x30, 0x31, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe7, 0x02, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x66, 0x61, 0x6e, 0x65, 0x7a, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x30, 0x30, 0x31, 0x2f, 0x67, 0x65, + 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x92, 0x41, 0xa0, 0x02, 0x12, + 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, + 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, + 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, + 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x72, 0x3d, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, + 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, + 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go index 5bf98c44aaf..3e70a6ec086 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go @@ -5,6 +5,7 @@ package v1 import ( fmt "fmt" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" _ "google.golang.org/genproto/googleapis/api/annotations" proto "google.golang.org/protobuf/proto" @@ -79,13 +80,10 @@ type AccountsService interface { // Lists accounts ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) // Gets an account - //rpc GetAccount(GetAccountRequest) returns (Account) { GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v1.Account, error) // Creates an account - //rpc CreateAccount(CreateAccountRequest) returns (Account) { CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v1.Account, error) // Updates an account - //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v1.Account, error) // Deletes an account DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) @@ -159,13 +157,10 @@ type AccountsServiceHandler interface { // Lists accounts ListAccounts(context.Context, *ListAccountsRequest, *ListAccountsResponse) error // Gets an account - //rpc GetAccount(GetAccountRequest) returns (Account) { GetAccount(context.Context, *GetAccountRequest, *v1.Account) error // Creates an account - //rpc CreateAccount(CreateAccountRequest) returns (Account) { CreateAccount(context.Context, *CreateAccountRequest, *v1.Account) error // Updates an account - //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { UpdateAccount(context.Context, *UpdateAccountRequest, *v1.Account) error // Deletes an account DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json index 4c78973aeba..90de3fdc11e 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -1,8 +1,17 @@ { "swagger": "2.0", "info": { - "title": "ocis/services/accounts/v1/accounts.proto", - "version": "version not set" + "title": "ownCloud Infinite Scale accounts", + "version": "1.0.0", + "contact": { + "name": "ownCloud GmbH", + "url": "https://github.com/owncloud/ocis", + "email": "support@owncloud.com" + }, + "license": { + "name": "Apache-2.0", + "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" + } }, "tags": [ { @@ -15,6 +24,10 @@ "name": "IndexService" } ], + "schemes": [ + "http", + "https" + ], "consumes": [ "application/json" ], @@ -24,7 +37,7 @@ "paths": { "/api/v1/accounts/accounts-create": { "post": { - "summary": "Creates an account\nrpc CreateAccount(CreateAccountRequest) returns (Account) {", + "summary": "Creates an account", "operationId": "AccountsService_CreateAccount", "responses": { "200": { @@ -90,7 +103,7 @@ }, "/api/v1/accounts/accounts-get": { "post": { - "summary": "Gets an account\nrpc GetAccount(GetAccountRequest) returns (Account) {", + "summary": "Gets an account", "operationId": "AccountsService_GetAccount", "responses": { "200": { @@ -156,7 +169,7 @@ }, "/api/v1/accounts/accounts-update": { "post": { - "summary": "Updates an account\nrpc UpdateAccount(UpdateAccountRequest) returns (Account) {", + "summary": "Updates an account", "operationId": "AccountsService_UpdateAccount", "responses": { "200": { @@ -1043,5 +1056,9 @@ } } } + }, + "externalDocs": { + "description": "Developer Manual", + "url": "https://owncloud.dev/extensions/accounts/" } } diff --git a/protogen/proto/buf.lock b/protogen/proto/buf.lock index d1ae93a8d87..5e153a1ed4c 100644 --- a/protogen/proto/buf.lock +++ b/protogen/proto/buf.lock @@ -8,3 +8,10 @@ deps: commit: 5860854adf6a48c39b19d54342b68385 digest: b1-WayFxGJKhSLbpMCQ-VZ5-3R5Gj9iRFYsMG7o57lgqog= create_time: 2021-12-14T15:10:38.563007Z + - remote: buf.build + owner: grpc-ecosystem + repository: grpc-gateway + branch: main + commit: ff83506eb9cc4cf8972f49ce87e6ed3e + digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= + create_time: 2021-10-23T16:26:52.283938Z diff --git a/protogen/proto/buf.yaml b/protogen/proto/buf.yaml index 361675a46bf..8d96e03b598 100644 --- a/protogen/proto/buf.yaml +++ b/protogen/proto/buf.yaml @@ -4,6 +4,7 @@ lint: - DEFAULT deps: - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway breaking: use: - FILE diff --git a/protogen/proto/ocis/services/accounts/v1/accounts.proto b/protogen/proto/ocis/services/accounts/v1/accounts.proto index 471f35a1e98..a5a57512690 100644 --- a/protogen/proto/ocis/services/accounts/v1/accounts.proto +++ b/protogen/proto/ocis/services/accounts/v1/accounts.proto @@ -9,6 +9,32 @@ import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "ownCloud Infinite Scale accounts"; + version: "1.0.0"; + contact: { + name: "ownCloud GmbH"; + url: "https://github.com/owncloud/ocis"; + email: "support@owncloud.com"; + }; + license: { + name: "Apache-2.0"; + url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; + }; + }; + schemes: HTTP; + schemes: HTTPS; + consumes: "application/json"; + produces: "application/json"; + external_docs: { + description: "Developer Manual"; + url: "https://owncloud.dev/extensions/accounts/"; + }; +}; + // Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods // https://cloud.google.com/apis/design/standard_methods?hl=de#list // https://cloud.google.com/apis/design/naming_convention?hl=de @@ -22,7 +48,6 @@ service AccountsService { }; } // Gets an account - //rpc GetAccount(GetAccountRequest) returns (Account) { rpc GetAccount(GetAccountRequest) returns (ocis.messages.accounts.v1.Account) { option (google.api.http) = { post: "/api/v1/accounts/accounts-get", @@ -30,7 +55,6 @@ service AccountsService { }; } // Creates an account - //rpc CreateAccount(CreateAccountRequest) returns (Account) { rpc CreateAccount(CreateAccountRequest) returns (ocis.messages.accounts.v1.Account) { // Create maps to HTTP POST. URL path as the collection name. // HTTP request body contains the resource @@ -40,7 +64,6 @@ service AccountsService { }; } // Updates an account - //rpc UpdateAccount(UpdateAccountRequest) returns (Account) { rpc UpdateAccount(UpdateAccountRequest) returns (ocis.messages.accounts.v1.Account) { // Update maps to HTTP PATCH. Resource name is mapped to a URL path. // Resource is contained in the HTTP request body From 04b8ef0fcb86c26ac270943fda1b5ffec44145b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Fri, 17 Dec 2021 14:25:55 +0100 Subject: [PATCH 05/20] Migrate thumbnails proto files and adjust related import paths --- .../ocis/messages/thumbnails/v1/grpc.md | 57 ++ .../ocis/services/thumbnails/v1/grpc.md | 74 +++ .../messages/thumbnails/v1/thumbnails.pb.go | 269 ++++++++ .../thumbnails/v1/thumbnails.pb.micro.go | 15 + .../thumbnails/v1/thumbnails.swagger.json | 43 ++ .../services/thumbnails/v1/thumbnails.pb.go | 413 ++++++++++++ .../thumbnails/v1}/thumbnails.pb.micro.go | 5 +- .../thumbnails/v1}/thumbnails.swagger.json | 6 +- protogen/proto/buf.gen.yaml | 6 +- .../messages/thumbnails/v1/thumbnails.proto | 23 + .../services/thumbnails/v1}/thumbnails.proto | 27 +- thumbnails/pkg/proto/v0/thumbnails.pb.go | 590 ------------------ .../pkg/proto/v0/thumbnails.pb.micro_test.go | 86 --- thumbnails/pkg/proto/v0/thumbnails.pb_test.go | 109 ---- thumbnails/pkg/server/grpc/server.go | 6 +- thumbnails/pkg/service/v0/instrument.go | 8 +- thumbnails/pkg/service/v0/logging.go | 8 +- thumbnails/pkg/service/v0/service.go | 12 +- thumbnails/pkg/service/v0/tracing.go | 8 +- webdav/pkg/service/v0/service.go | 33 +- 20 files changed, 948 insertions(+), 850 deletions(-) create mode 100644 protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md create mode 100644 protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md create mode 100644 protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go create mode 100644 protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go create mode 100644 protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json create mode 100644 protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go rename {thumbnails/pkg/proto/v0 => protogen/gen/ocis/services/thumbnails/v1}/thumbnails.pb.micro.go (94%) rename {thumbnails/pkg/proto/v0 => protogen/gen/ocis/services/thumbnails/v1}/thumbnails.swagger.json (97%) create mode 100644 protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto rename {thumbnails/proto/v0 => protogen/proto/ocis/services/thumbnails/v1}/thumbnails.proto (76%) delete mode 100644 thumbnails/pkg/proto/v0/thumbnails.pb.go delete mode 100644 thumbnails/pkg/proto/v0/thumbnails.pb.micro_test.go delete mode 100644 thumbnails/pkg/proto/v0/thumbnails.pb_test.go diff --git a/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md b/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md new file mode 100644 index 00000000000..645c3dfc13f --- /dev/null +++ b/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md @@ -0,0 +1,57 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/messages/thumbnails/v1/thumbnails.proto + +### CS3Source + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| path | [string](#string) | | | +| authorization | [string](#string) | | | + +### WebdavSource + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| url | [string](#string) | | REQUIRED. | +| is_public_link | [bool](#bool) | | REQUIRED. | +| webdav_authorization | [string](#string) | | OPTIONAL. | +| reva_authorization | [string](#string) | | OPTIONAL. | +| public_link_token | [string](#string) | | OPTIONAL. | + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md b/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md new file mode 100644 index 00000000000..1c958300206 --- /dev/null +++ b/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md @@ -0,0 +1,74 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/services/thumbnails/v1/thumbnails.proto + +### GetThumbnailRequest + +A request to retrieve a thumbnail + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| filepath | [string](#string) | | The path to the source image | +| thumbnail_type | [GetThumbnailRequest.ThumbnailType](#getthumbnailrequestthumbnailtype) | | The type to which the thumbnail should get encoded to. | +| width | [int32](#int32) | | The width of the thumbnail | +| height | [int32](#int32) | | The height of the thumbnail | +| webdav_source | [ocis.messages.thumbnails.v1.WebdavSource](../../../messages/thumbnails/v1/grpc.md#webdavsource) | | | +| cs3_source | [ocis.messages.thumbnails.v1.CS3Source](../../../messages/thumbnails/v1/grpc.md#cs3source) | | | + +### GetThumbnailResponse + +The service response + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| thumbnail | [bytes](#bytes) | | The thumbnail as a binary | +| mimetype | [string](#string) | | The mimetype of the thumbnail | + +### GetThumbnailRequest.ThumbnailType + +The file types to which the thumbnail can get encoded to. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| PNG | 0 | Represents PNG type | +| JPG | 1 | Represents JPG type | + +### ThumbnailService + +A Service for handling thumbnail generation + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| GetThumbnail | [GetThumbnailRequest](#getthumbnailrequest) | [GetThumbnailResponse](#getthumbnailresponse) | Generates the thumbnail and returns it. | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go new file mode 100644 index 00000000000..f5caeb6e3ae --- /dev/null +++ b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go @@ -0,0 +1,269 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/messages/thumbnails/v1/thumbnails.proto + +package v1 + +import ( + 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) +) + +type WebdavSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // REQUIRED. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // REQUIRED. + IsPublicLink bool `protobuf:"varint,2,opt,name=is_public_link,json=isPublicLink,proto3" json:"is_public_link,omitempty"` + // OPTIONAL. + WebdavAuthorization string `protobuf:"bytes,3,opt,name=webdav_authorization,json=webdavAuthorization,proto3" json:"webdav_authorization,omitempty"` + // OPTIONAL. + RevaAuthorization string `protobuf:"bytes,4,opt,name=reva_authorization,json=revaAuthorization,proto3" json:"reva_authorization,omitempty"` + // OPTIONAL. + PublicLinkToken string `protobuf:"bytes,5,opt,name=public_link_token,json=publicLinkToken,proto3" json:"public_link_token,omitempty"` +} + +func (x *WebdavSource) Reset() { + *x = WebdavSource{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WebdavSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebdavSource) ProtoMessage() {} + +func (x *WebdavSource) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_thumbnails_v1_thumbnails_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 WebdavSource.ProtoReflect.Descriptor instead. +func (*WebdavSource) Descriptor() ([]byte, []int) { + return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0} +} + +func (x *WebdavSource) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *WebdavSource) GetIsPublicLink() bool { + if x != nil { + return x.IsPublicLink + } + return false +} + +func (x *WebdavSource) GetWebdavAuthorization() string { + if x != nil { + return x.WebdavAuthorization + } + return "" +} + +func (x *WebdavSource) GetRevaAuthorization() string { + if x != nil { + return x.RevaAuthorization + } + return "" +} + +func (x *WebdavSource) GetPublicLinkToken() string { + if x != nil { + return x.PublicLinkToken + } + return "" +} + +type CS3Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` +} + +func (x *CS3Source) Reset() { + *x = CS3Source{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CS3Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CS3Source) ProtoMessage() {} + +func (x *CS3Source) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_thumbnails_v1_thumbnails_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 CS3Source.ProtoReflect.Descriptor instead. +func (*CS3Source) Descriptor() ([]byte, []int) { + return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{1} +} + +func (x *CS3Source) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CS3Source) GetAuthorization() string { + if x != nil { + return x.Authorization + } + return "" +} + +var File_ocis_messages_thumbnails_v1_thumbnails_proto protoreflect.FileDescriptor + +var file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x22, 0xd4, 0x01, 0x0a, 0x0c, + 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, + 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x76, 0x61, 0x5f, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x76, 0x61, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescOnce sync.Once + file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData = file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc +) + +func file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP() []byte { + file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescOnce.Do(func() { + file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData) + }) + return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData +} + +var file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes = []interface{}{ + (*WebdavSource)(nil), // 0: ocis.messages.thumbnails.v1.WebdavSource + (*CS3Source)(nil), // 1: ocis.messages.thumbnails.v1.CS3Source +} +var file_ocis_messages_thumbnails_v1_thumbnails_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_ocis_messages_thumbnails_v1_thumbnails_proto_init() } +func file_ocis_messages_thumbnails_v1_thumbnails_proto_init() { + if File_ocis_messages_thumbnails_v1_thumbnails_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WebdavSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CS3Source); 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_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes, + DependencyIndexes: file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs, + MessageInfos: file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes, + }.Build() + File_ocis_messages_thumbnails_v1_thumbnails_proto = out.File + file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc = nil + file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes = nil + file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go new file mode 100644 index 00000000000..8e8ae50c726 --- /dev/null +++ b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/messages/thumbnails/v1/thumbnails.proto + +package v1 + +import ( + fmt "fmt" + proto "google.golang.org/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json new file mode 100644 index 00000000000..0060cf673d3 --- /dev/null +++ b/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "ocis/messages/thumbnails/v1/thumbnails.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go new file mode 100644 index 00000000000..14adf22d3a4 --- /dev/null +++ b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/services/thumbnails/v1/thumbnails.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" + 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) +) + +// The file types to which the thumbnail can get encoded to. +type GetThumbnailRequest_ThumbnailType int32 + +const ( + GetThumbnailRequest_PNG GetThumbnailRequest_ThumbnailType = 0 // Represents PNG type + GetThumbnailRequest_JPG GetThumbnailRequest_ThumbnailType = 1 // Represents JPG type +) + +// Enum value maps for GetThumbnailRequest_ThumbnailType. +var ( + GetThumbnailRequest_ThumbnailType_name = map[int32]string{ + 0: "PNG", + 1: "JPG", + } + GetThumbnailRequest_ThumbnailType_value = map[string]int32{ + "PNG": 0, + "JPG": 1, + } +) + +func (x GetThumbnailRequest_ThumbnailType) Enum() *GetThumbnailRequest_ThumbnailType { + p := new(GetThumbnailRequest_ThumbnailType) + *p = x + return p +} + +func (x GetThumbnailRequest_ThumbnailType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GetThumbnailRequest_ThumbnailType) Descriptor() protoreflect.EnumDescriptor { + return file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes[0].Descriptor() +} + +func (GetThumbnailRequest_ThumbnailType) Type() protoreflect.EnumType { + return &file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes[0] +} + +func (x GetThumbnailRequest_ThumbnailType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GetThumbnailRequest_ThumbnailType.Descriptor instead. +func (GetThumbnailRequest_ThumbnailType) EnumDescriptor() ([]byte, []int) { + return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0, 0} +} + +// A request to retrieve a thumbnail +type GetThumbnailRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to the source image + Filepath string `protobuf:"bytes,1,opt,name=filepath,proto3" json:"filepath,omitempty"` + // The type to which the thumbnail should get encoded to. + ThumbnailType GetThumbnailRequest_ThumbnailType `protobuf:"varint,2,opt,name=thumbnail_type,json=thumbnailType,proto3,enum=ocis.services.thumbnails.v1.GetThumbnailRequest_ThumbnailType" json:"thumbnail_type,omitempty"` + // The width of the thumbnail + Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` + // The height of the thumbnail + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + // Types that are assignable to Source: + // *GetThumbnailRequest_WebdavSource + // *GetThumbnailRequest_Cs3Source + Source isGetThumbnailRequest_Source `protobuf_oneof:"source"` +} + +func (x *GetThumbnailRequest) Reset() { + *x = GetThumbnailRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetThumbnailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetThumbnailRequest) ProtoMessage() {} + +func (x *GetThumbnailRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_thumbnails_v1_thumbnails_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 GetThumbnailRequest.ProtoReflect.Descriptor instead. +func (*GetThumbnailRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0} +} + +func (x *GetThumbnailRequest) GetFilepath() string { + if x != nil { + return x.Filepath + } + return "" +} + +func (x *GetThumbnailRequest) GetThumbnailType() GetThumbnailRequest_ThumbnailType { + if x != nil { + return x.ThumbnailType + } + return GetThumbnailRequest_PNG +} + +func (x *GetThumbnailRequest) GetWidth() int32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *GetThumbnailRequest) GetHeight() int32 { + if x != nil { + return x.Height + } + return 0 +} + +func (m *GetThumbnailRequest) GetSource() isGetThumbnailRequest_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *GetThumbnailRequest) GetWebdavSource() *v1.WebdavSource { + if x, ok := x.GetSource().(*GetThumbnailRequest_WebdavSource); ok { + return x.WebdavSource + } + return nil +} + +func (x *GetThumbnailRequest) GetCs3Source() *v1.CS3Source { + if x, ok := x.GetSource().(*GetThumbnailRequest_Cs3Source); ok { + return x.Cs3Source + } + return nil +} + +type isGetThumbnailRequest_Source interface { + isGetThumbnailRequest_Source() +} + +type GetThumbnailRequest_WebdavSource struct { + WebdavSource *v1.WebdavSource `protobuf:"bytes,5,opt,name=webdav_source,json=webdavSource,proto3,oneof"` +} + +type GetThumbnailRequest_Cs3Source struct { + Cs3Source *v1.CS3Source `protobuf:"bytes,6,opt,name=cs3_source,json=cs3Source,proto3,oneof"` +} + +func (*GetThumbnailRequest_WebdavSource) isGetThumbnailRequest_Source() {} + +func (*GetThumbnailRequest_Cs3Source) isGetThumbnailRequest_Source() {} + +// The service response +type GetThumbnailResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The thumbnail as a binary + Thumbnail []byte `protobuf:"bytes,1,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` + // The mimetype of the thumbnail + Mimetype string `protobuf:"bytes,2,opt,name=mimetype,proto3" json:"mimetype,omitempty"` +} + +func (x *GetThumbnailResponse) Reset() { + *x = GetThumbnailResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetThumbnailResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetThumbnailResponse) ProtoMessage() {} + +func (x *GetThumbnailResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_thumbnails_v1_thumbnails_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 GetThumbnailResponse.ProtoReflect.Descriptor instead. +func (*GetThumbnailResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{1} +} + +func (x *GetThumbnailResponse) GetThumbnail() []byte { + if x != nil { + return x.Thumbnail + } + return nil +} + +func (x *GetThumbnailResponse) GetMimetype() string { + if x != nil { + return x.Mimetype + } + return "" +} + +var File_ocis_services_thumbnails_v1_thumbnails_proto protoreflect.FileDescriptor + +var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x2c, 0x6f, 0x63, 0x69, + 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, + 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, + 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, 0x22, 0x8e, 0x03, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0x65, 0x0a, + 0x0e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, + 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, + 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x63, 0x73, 0x33, 0x5f, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, + 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x09, 0x63, 0x73, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x21, 0x0a, + 0x0d, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x50, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x50, 0x47, 0x10, 0x01, + 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, + 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x74, 0x79, 0x70, 0x65, 0x32, 0x87, 0x01, 0x0a, + 0x10, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, + 0x6c, 0x12, 0x30, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x02, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, + 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, + 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x92, 0x41, 0xa4, 0x02, + 0x12, 0xb8, 0x01, 0x0a, 0x22, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x75, + 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, + 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, + 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, + 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, + 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x72, 0x3f, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, + 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x2b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, + 0x69, 0x6c, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescOnce sync.Once + file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData = file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc +) + +func file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP() []byte { + file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescOnce.Do(func() { + file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData) + }) + return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData +} + +var file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes = []interface{}{ + (GetThumbnailRequest_ThumbnailType)(0), // 0: ocis.services.thumbnails.v1.GetThumbnailRequest.ThumbnailType + (*GetThumbnailRequest)(nil), // 1: ocis.services.thumbnails.v1.GetThumbnailRequest + (*GetThumbnailResponse)(nil), // 2: ocis.services.thumbnails.v1.GetThumbnailResponse + (*v1.WebdavSource)(nil), // 3: ocis.messages.thumbnails.v1.WebdavSource + (*v1.CS3Source)(nil), // 4: ocis.messages.thumbnails.v1.CS3Source +} +var file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs = []int32{ + 0, // 0: ocis.services.thumbnails.v1.GetThumbnailRequest.thumbnail_type:type_name -> ocis.services.thumbnails.v1.GetThumbnailRequest.ThumbnailType + 3, // 1: ocis.services.thumbnails.v1.GetThumbnailRequest.webdav_source:type_name -> ocis.messages.thumbnails.v1.WebdavSource + 4, // 2: ocis.services.thumbnails.v1.GetThumbnailRequest.cs3_source:type_name -> ocis.messages.thumbnails.v1.CS3Source + 1, // 3: ocis.services.thumbnails.v1.ThumbnailService.GetThumbnail:input_type -> ocis.services.thumbnails.v1.GetThumbnailRequest + 2, // 4: ocis.services.thumbnails.v1.ThumbnailService.GetThumbnail:output_type -> ocis.services.thumbnails.v1.GetThumbnailResponse + 4, // [4:5] is the sub-list for method output_type + 3, // [3:4] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_ocis_services_thumbnails_v1_thumbnails_proto_init() } +func file_ocis_services_thumbnails_v1_thumbnails_proto_init() { + if File_ocis_services_thumbnails_v1_thumbnails_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetThumbnailRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetThumbnailResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*GetThumbnailRequest_WebdavSource)(nil), + (*GetThumbnailRequest_Cs3Source)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes, + DependencyIndexes: file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs, + EnumInfos: file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes, + MessageInfos: file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes, + }.Build() + File_ocis_services_thumbnails_v1_thumbnails_proto = out.File + file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = nil + file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes = nil + file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs = nil +} diff --git a/thumbnails/pkg/proto/v0/thumbnails.pb.micro.go b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go similarity index 94% rename from thumbnails/pkg/proto/v0/thumbnails.pb.micro.go rename to protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go index d0e08ad6f3b..281619319ec 100644 --- a/thumbnails/pkg/proto/v0/thumbnails.pb.micro.go +++ b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go @@ -1,11 +1,12 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/v0/thumbnails.proto +// source: ocis/services/thumbnails/v1/thumbnails.proto -package proto +package v1 import ( fmt "fmt" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" proto "google.golang.org/protobuf/proto" math "math" ) diff --git a/thumbnails/pkg/proto/v0/thumbnails.swagger.json b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json similarity index 97% rename from thumbnails/pkg/proto/v0/thumbnails.swagger.json rename to protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json index f79a4f11908..982d589206b 100644 --- a/thumbnails/pkg/proto/v0/thumbnails.swagger.json +++ b/protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json @@ -66,7 +66,7 @@ } } }, - "v0CS3Source": { + "v1CS3Source": { "type": "object", "properties": { "path": { @@ -77,7 +77,7 @@ } } }, - "v0GetThumbnailResponse": { + "v1GetThumbnailResponse": { "type": "object", "properties": { "thumbnail": { @@ -92,7 +92,7 @@ }, "title": "The service response" }, - "v0WebdavSource": { + "v1WebdavSource": { "type": "object", "properties": { "url": { diff --git a/protogen/proto/buf.gen.yaml b/protogen/proto/buf.gen.yaml index 6c8f06d436f..cbd866c2771 100644 --- a/protogen/proto/buf.gen.yaml +++ b/protogen/proto/buf.gen.yaml @@ -13,10 +13,14 @@ plugins: - paths=source_relative - name: microweb - path: ../../.bingo/protoc-gen-microweb + #path: ../../.bingo/protoc-gen-microweb + path: ../../../protoc-gen-microweb/protoc-gen-microweb out: ../gen/ opt: - paths=source_relative + - "ignore_packages=\ + ocis.services.thumbnails.v1;\ + ocis.messages.thumbnails.v1" - name: openapiv2 path: ../../.bingo/protoc-gen-openapiv2 diff --git a/protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto b/protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto new file mode 100644 index 00000000000..1a3afa174e8 --- /dev/null +++ b/protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package ocis.messages.thumbnails.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1"; + +message WebdavSource { + // REQUIRED. + string url = 1; + // REQUIRED. + bool is_public_link = 2; + // OPTIONAL. + string webdav_authorization = 3; + // OPTIONAL. + string reva_authorization = 4; + // OPTIONAL. + string public_link_token = 5; +} + +message CS3Source { + string path = 1; + string authorization = 2; +} diff --git a/thumbnails/proto/v0/thumbnails.proto b/protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto similarity index 76% rename from thumbnails/proto/v0/thumbnails.proto rename to protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto index 2c5d956daf9..3facf001d43 100644 --- a/thumbnails/proto/v0/thumbnails.proto +++ b/protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto @@ -1,9 +1,10 @@ syntax = "proto3"; -package com.owncloud.ocis.thumbnails.v0; +package ocis.services.thumbnails.v1; -option go_package = "github.com/owncloud/ocis/thumbnails/pkg/proto/v0;proto"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1"; +import "ocis/messages/thumbnails/v1/thumbnails.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { @@ -52,29 +53,11 @@ message GetThumbnailRequest { // The height of the thumbnail int32 height = 4; oneof source { - WebdavSource webdav_source = 5; - CS3Source cs3_source = 6; + ocis.messages.thumbnails.v1.WebdavSource webdav_source = 5; + ocis.messages.thumbnails.v1.CS3Source cs3_source = 6; } } -message WebdavSource { - // REQUIRED. - string url = 1; - // REQUIRED. - bool is_public_link = 2; - // OPTIONAL. - string webdav_authorization = 3; - // OPTIONAL. - string reva_authorization = 4; - // OPTIONAL. - string public_link_token = 5; -} - -message CS3Source { - string path = 1; - string authorization = 2; -} - // The service response message GetThumbnailResponse { // The thumbnail as a binary diff --git a/thumbnails/pkg/proto/v0/thumbnails.pb.go b/thumbnails/pkg/proto/v0/thumbnails.pb.go deleted file mode 100644 index 009f3362a06..00000000000 --- a/thumbnails/pkg/proto/v0/thumbnails.pb.go +++ /dev/null @@ -1,590 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 -// source: proto/v0/thumbnails.proto - -package proto - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - 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) -) - -// The file types to which the thumbnail can get encoded to. -type GetThumbnailRequest_ThumbnailType int32 - -const ( - GetThumbnailRequest_PNG GetThumbnailRequest_ThumbnailType = 0 // Represents PNG type - GetThumbnailRequest_JPG GetThumbnailRequest_ThumbnailType = 1 // Represents JPG type -) - -// Enum value maps for GetThumbnailRequest_ThumbnailType. -var ( - GetThumbnailRequest_ThumbnailType_name = map[int32]string{ - 0: "PNG", - 1: "JPG", - } - GetThumbnailRequest_ThumbnailType_value = map[string]int32{ - "PNG": 0, - "JPG": 1, - } -) - -func (x GetThumbnailRequest_ThumbnailType) Enum() *GetThumbnailRequest_ThumbnailType { - p := new(GetThumbnailRequest_ThumbnailType) - *p = x - return p -} - -func (x GetThumbnailRequest_ThumbnailType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetThumbnailRequest_ThumbnailType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_v0_thumbnails_proto_enumTypes[0].Descriptor() -} - -func (GetThumbnailRequest_ThumbnailType) Type() protoreflect.EnumType { - return &file_proto_v0_thumbnails_proto_enumTypes[0] -} - -func (x GetThumbnailRequest_ThumbnailType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetThumbnailRequest_ThumbnailType.Descriptor instead. -func (GetThumbnailRequest_ThumbnailType) EnumDescriptor() ([]byte, []int) { - return file_proto_v0_thumbnails_proto_rawDescGZIP(), []int{0, 0} -} - -// A request to retrieve a thumbnail -type GetThumbnailRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The path to the source image - Filepath string `protobuf:"bytes,1,opt,name=filepath,proto3" json:"filepath,omitempty"` - // The type to which the thumbnail should get encoded to. - ThumbnailType GetThumbnailRequest_ThumbnailType `protobuf:"varint,2,opt,name=thumbnail_type,json=thumbnailType,proto3,enum=com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest_ThumbnailType" json:"thumbnail_type,omitempty"` - // The width of the thumbnail - Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` - // The height of the thumbnail - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` - // Types that are assignable to Source: - // *GetThumbnailRequest_WebdavSource - // *GetThumbnailRequest_Cs3Source - Source isGetThumbnailRequest_Source `protobuf_oneof:"source"` -} - -func (x *GetThumbnailRequest) Reset() { - *x = GetThumbnailRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_thumbnails_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetThumbnailRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetThumbnailRequest) ProtoMessage() {} - -func (x *GetThumbnailRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_thumbnails_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 GetThumbnailRequest.ProtoReflect.Descriptor instead. -func (*GetThumbnailRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_thumbnails_proto_rawDescGZIP(), []int{0} -} - -func (x *GetThumbnailRequest) GetFilepath() string { - if x != nil { - return x.Filepath - } - return "" -} - -func (x *GetThumbnailRequest) GetThumbnailType() GetThumbnailRequest_ThumbnailType { - if x != nil { - return x.ThumbnailType - } - return GetThumbnailRequest_PNG -} - -func (x *GetThumbnailRequest) GetWidth() int32 { - if x != nil { - return x.Width - } - return 0 -} - -func (x *GetThumbnailRequest) GetHeight() int32 { - if x != nil { - return x.Height - } - return 0 -} - -func (m *GetThumbnailRequest) GetSource() isGetThumbnailRequest_Source { - if m != nil { - return m.Source - } - return nil -} - -func (x *GetThumbnailRequest) GetWebdavSource() *WebdavSource { - if x, ok := x.GetSource().(*GetThumbnailRequest_WebdavSource); ok { - return x.WebdavSource - } - return nil -} - -func (x *GetThumbnailRequest) GetCs3Source() *CS3Source { - if x, ok := x.GetSource().(*GetThumbnailRequest_Cs3Source); ok { - return x.Cs3Source - } - return nil -} - -type isGetThumbnailRequest_Source interface { - isGetThumbnailRequest_Source() -} - -type GetThumbnailRequest_WebdavSource struct { - WebdavSource *WebdavSource `protobuf:"bytes,5,opt,name=webdav_source,json=webdavSource,proto3,oneof"` -} - -type GetThumbnailRequest_Cs3Source struct { - Cs3Source *CS3Source `protobuf:"bytes,6,opt,name=cs3_source,json=cs3Source,proto3,oneof"` -} - -func (*GetThumbnailRequest_WebdavSource) isGetThumbnailRequest_Source() {} - -func (*GetThumbnailRequest_Cs3Source) isGetThumbnailRequest_Source() {} - -type WebdavSource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // REQUIRED. - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - // REQUIRED. - IsPublicLink bool `protobuf:"varint,2,opt,name=is_public_link,json=isPublicLink,proto3" json:"is_public_link,omitempty"` - // OPTIONAL. - WebdavAuthorization string `protobuf:"bytes,3,opt,name=webdav_authorization,json=webdavAuthorization,proto3" json:"webdav_authorization,omitempty"` - // OPTIONAL. - RevaAuthorization string `protobuf:"bytes,4,opt,name=reva_authorization,json=revaAuthorization,proto3" json:"reva_authorization,omitempty"` - // OPTIONAL. - PublicLinkToken string `protobuf:"bytes,5,opt,name=public_link_token,json=publicLinkToken,proto3" json:"public_link_token,omitempty"` -} - -func (x *WebdavSource) Reset() { - *x = WebdavSource{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_thumbnails_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WebdavSource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WebdavSource) ProtoMessage() {} - -func (x *WebdavSource) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_thumbnails_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 WebdavSource.ProtoReflect.Descriptor instead. -func (*WebdavSource) Descriptor() ([]byte, []int) { - return file_proto_v0_thumbnails_proto_rawDescGZIP(), []int{1} -} - -func (x *WebdavSource) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *WebdavSource) GetIsPublicLink() bool { - if x != nil { - return x.IsPublicLink - } - return false -} - -func (x *WebdavSource) GetWebdavAuthorization() string { - if x != nil { - return x.WebdavAuthorization - } - return "" -} - -func (x *WebdavSource) GetRevaAuthorization() string { - if x != nil { - return x.RevaAuthorization - } - return "" -} - -func (x *WebdavSource) GetPublicLinkToken() string { - if x != nil { - return x.PublicLinkToken - } - return "" -} - -type CS3Source struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` -} - -func (x *CS3Source) Reset() { - *x = CS3Source{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_thumbnails_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CS3Source) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CS3Source) ProtoMessage() {} - -func (x *CS3Source) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_thumbnails_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 CS3Source.ProtoReflect.Descriptor instead. -func (*CS3Source) Descriptor() ([]byte, []int) { - return file_proto_v0_thumbnails_proto_rawDescGZIP(), []int{2} -} - -func (x *CS3Source) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *CS3Source) GetAuthorization() string { - if x != nil { - return x.Authorization - } - return "" -} - -// The service response -type GetThumbnailResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The thumbnail as a binary - Thumbnail []byte `protobuf:"bytes,1,opt,name=thumbnail,proto3" json:"thumbnail,omitempty"` - // The mimetype of the thumbnail - Mimetype string `protobuf:"bytes,2,opt,name=mimetype,proto3" json:"mimetype,omitempty"` -} - -func (x *GetThumbnailResponse) Reset() { - *x = GetThumbnailResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_thumbnails_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetThumbnailResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetThumbnailResponse) ProtoMessage() {} - -func (x *GetThumbnailResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_thumbnails_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 GetThumbnailResponse.ProtoReflect.Descriptor instead. -func (*GetThumbnailResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_thumbnails_proto_rawDescGZIP(), []int{3} -} - -func (x *GetThumbnailResponse) GetThumbnail() []byte { - if x != nil { - return x.Thumbnail - } - return nil -} - -func (x *GetThumbnailResponse) GetMimetype() string { - if x != nil { - return x.Mimetype - } - return "" -} - -var File_proto_v0_thumbnails_proto protoreflect.FileDescriptor - -var file_proto_v0_thumbnails_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, - 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x74, - 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 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, 0x22, 0x9a, 0x03, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x69, 0x0a, 0x0e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x74, 0x68, 0x75, - 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, - 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, - 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, - 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x54, 0x0a, 0x0d, 0x77, 0x65, 0x62, - 0x64, 0x61, 0x76, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x4b, 0x0a, 0x0a, 0x63, 0x73, 0x33, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, - 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, - 0x00, 0x52, 0x09, 0x63, 0x73, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x0d, - 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, - 0x03, 0x50, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x50, 0x47, 0x10, 0x01, 0x42, - 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x0c, 0x57, 0x65, - 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0e, - 0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, - 0x6e, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x13, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x76, 0x61, 0x5f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x72, 0x65, 0x76, 0x61, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, - 0x69, 0x6e, 0x6b, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, 0x6e, 0x6b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x45, 0x0a, 0x09, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x54, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6d, 0x69, 0x6d, 0x65, 0x74, 0x79, 0x70, 0x65, 0x32, 0x8f, 0x01, 0x0a, 0x10, 0x54, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x12, 0x34, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, - 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, - 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xe0, 0x02, 0x5a, 0x36, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, - 0x69, 0x6c, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, - 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x41, 0xa4, 0x02, 0x12, 0xb8, 0x01, 0x0a, 0x22, 0x6f, - 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, - 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, - 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, - 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, - 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, - 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, - 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, - 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, - 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3f, 0x0a, - 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, - 0x6c, 0x12, 0x2b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_v0_thumbnails_proto_rawDescOnce sync.Once - file_proto_v0_thumbnails_proto_rawDescData = file_proto_v0_thumbnails_proto_rawDesc -) - -func file_proto_v0_thumbnails_proto_rawDescGZIP() []byte { - file_proto_v0_thumbnails_proto_rawDescOnce.Do(func() { - file_proto_v0_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_v0_thumbnails_proto_rawDescData) - }) - return file_proto_v0_thumbnails_proto_rawDescData -} - -var file_proto_v0_thumbnails_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_proto_v0_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proto_v0_thumbnails_proto_goTypes = []interface{}{ - (GetThumbnailRequest_ThumbnailType)(0), // 0: com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest.ThumbnailType - (*GetThumbnailRequest)(nil), // 1: com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest - (*WebdavSource)(nil), // 2: com.owncloud.ocis.thumbnails.v0.WebdavSource - (*CS3Source)(nil), // 3: com.owncloud.ocis.thumbnails.v0.CS3Source - (*GetThumbnailResponse)(nil), // 4: com.owncloud.ocis.thumbnails.v0.GetThumbnailResponse -} -var file_proto_v0_thumbnails_proto_depIdxs = []int32{ - 0, // 0: com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest.thumbnail_type:type_name -> com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest.ThumbnailType - 2, // 1: com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest.webdav_source:type_name -> com.owncloud.ocis.thumbnails.v0.WebdavSource - 3, // 2: com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest.cs3_source:type_name -> com.owncloud.ocis.thumbnails.v0.CS3Source - 1, // 3: com.owncloud.ocis.thumbnails.v0.ThumbnailService.GetThumbnail:input_type -> com.owncloud.ocis.thumbnails.v0.GetThumbnailRequest - 4, // 4: com.owncloud.ocis.thumbnails.v0.ThumbnailService.GetThumbnail:output_type -> com.owncloud.ocis.thumbnails.v0.GetThumbnailResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_proto_v0_thumbnails_proto_init() } -func file_proto_v0_thumbnails_proto_init() { - if File_proto_v0_thumbnails_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_v0_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetThumbnailRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WebdavSource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_thumbnails_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CS3Source); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_thumbnails_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetThumbnailResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_v0_thumbnails_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*GetThumbnailRequest_WebdavSource)(nil), - (*GetThumbnailRequest_Cs3Source)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_v0_thumbnails_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_v0_thumbnails_proto_goTypes, - DependencyIndexes: file_proto_v0_thumbnails_proto_depIdxs, - EnumInfos: file_proto_v0_thumbnails_proto_enumTypes, - MessageInfos: file_proto_v0_thumbnails_proto_msgTypes, - }.Build() - File_proto_v0_thumbnails_proto = out.File - file_proto_v0_thumbnails_proto_rawDesc = nil - file_proto_v0_thumbnails_proto_goTypes = nil - file_proto_v0_thumbnails_proto_depIdxs = nil -} diff --git a/thumbnails/pkg/proto/v0/thumbnails.pb.micro_test.go b/thumbnails/pkg/proto/v0/thumbnails.pb.micro_test.go deleted file mode 100644 index a435cdf364b..00000000000 --- a/thumbnails/pkg/proto/v0/thumbnails.pb.micro_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package proto_test - -import ( - "context" - "log" - "os" - "path/filepath" - "testing" - - "github.com/owncloud/ocis/ocis-pkg/service/grpc" - "github.com/owncloud/ocis/thumbnails/pkg/config" - "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" - "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/imgsource" - "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/storage" - "github.com/stretchr/testify/assert" - - svc "github.com/owncloud/ocis/thumbnails/pkg/service/v0" -) - -var service = grpc.Service{} - -func init() { - service = grpc.NewService( - grpc.Namespace("com.owncloud.api"), - grpc.Name("thumbnails"), - grpc.Address("localhost:9992"), - ) - - cfg := config.DefaultConfig() - cfg.Thumbnail.Resolutions = []string{"16x16", "32x32", "64x64", "128x128"} - - wd, _ := os.Getwd() - fsCfg := config.FileSystemSource{ - BasePath: filepath.Join(wd, "../../../testdata/"), - } - err := proto.RegisterThumbnailServiceHandler( - service.Server(), - svc.NewService( - svc.Config(cfg), - svc.ThumbnailStorage(storage.NewInMemoryStorage()), - svc.ThumbnailSource(imgsource.NewFileSystemSource(fsCfg)), - ), - ) - if err != nil { - log.Fatalf("could not register ThumbnailHandler: %v", err) - } - if err := service.Server().Start(); err != nil { - log.Fatalf("could not start server: %v", err) - } -} - -func TestGetThumbnailInvalidImage(t *testing.T) { - req := proto.GetThumbnailRequest{ - Filepath: "invalid.png", - ThumbnailType: proto.GetThumbnailRequest_PNG, - Height: 32, - Width: 32, - } - client := service.Client() - cl := proto.NewThumbnailService("com.owncloud.api.thumbnails", client) - _, err := cl.GetThumbnail(context.Background(), &req) - - assert.NotNil(t, err) -} - -// TODO(corby) update tests -//func TestGetThumbnail(t *testing.T) { -// req := proto.GetThumbnailRequest{ -// Filepath: "oc.png", -// ThumbnailType: proto.GetThumbnailRequest_PNG, -// Height: 32, -// Width: 32, -// } -// client := service.Client() -// cl := proto.NewThumbnailService("com.owncloud.api.thumbnails", client) -// rsp, err := cl.GetThumbnail(context.Background(), &req) -// if err != nil { -// log.Fatalf("error %s", err.Error()) -// } -// assert.NotEmpty(t, rsp.GetThumbnail()) -// -// img, _, _ := image.Decode(bytes.NewReader(rsp.GetThumbnail())) -// assert.Equal(t, 32, img.Bounds().Size().X) -// -// assert.Equal(t, "image/png", rsp.GetMimetype()) -//} diff --git a/thumbnails/pkg/proto/v0/thumbnails.pb_test.go b/thumbnails/pkg/proto/v0/thumbnails.pb_test.go deleted file mode 100644 index e09610f7111..00000000000 --- a/thumbnails/pkg/proto/v0/thumbnails.pb_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package proto_test - -import ( - "testing" - - "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" - "github.com/stretchr/testify/assert" -) - -type TestRequest struct { - testDataName string - filepath string - filetype proto.GetThumbnailRequest_ThumbnailType - Checksum string - width int32 - height int32 - expected proto.GetThumbnailRequest -} - -type TestResponse struct { - testDataName string - img []byte - mimetype string - expected proto.GetThumbnailResponse -} - -func TestRequestString(t *testing.T) { - - var tests = []*TestRequest{ - { - "ASCII", - "Foo.jpg", - proto.GetThumbnailRequest_JPG, - "33a64df551425fcc55e4d42a148795d9f25f89d4", - 24, - 24, - proto.GetThumbnailRequest{ - Filepath: "Foo.jpg", - ThumbnailType: proto.GetThumbnailRequest_JPG, - Width: 24, - Height: 24, - }, - }, - { - "UTF", - "मिलन.jpg", - proto.GetThumbnailRequest_JPG, - "33a64df551425fcc55e4d42a148795d9f25f89d4", - 24, - 24, - proto.GetThumbnailRequest{ - Filepath: "\340\244\256\340\244\277\340\244\262\340\244\250.jpg", - ThumbnailType: proto.GetThumbnailRequest_JPG, - Width: 24, - Height: 24, - }, - }, - { - "PNG", - "Foo.png", - proto.GetThumbnailRequest_PNG, - "33a64df551425fcc55e4d42a148795d9f25f89d4", - 24, - 24, - proto.GetThumbnailRequest{ - Filepath: "Foo.png", - Width: 24, - Height: 24, - }, - }, - } - - for _, testCase := range tests { - t.Run(testCase.testDataName, func(t *testing.T) { - req := proto.GetThumbnailRequest{ - Filepath: testCase.filepath, - ThumbnailType: testCase.filetype, - Height: testCase.height, - Width: testCase.width, - } - assert.Equal(t, testCase.expected.String(), req.String()) - }) - } -} - -func TestResponseString(t *testing.T) { - var tests = []*TestResponse{ - { - "ASCII", - []byte("image data"), - "image/png", - proto.GetThumbnailResponse{ - Thumbnail: []byte("image data"), - Mimetype: "image/png", - }, - }, - } - - for _, testCase := range tests { - t.Run(testCase.testDataName, func(t *testing.T) { - response := proto.GetThumbnailResponse{ - Thumbnail: testCase.img, - Mimetype: testCase.mimetype, - } - - assert.Equal(t, testCase.expected.String(), response.String()) - }) - } -} diff --git a/thumbnails/pkg/server/grpc/server.go b/thumbnails/pkg/server/grpc/server.go index b90dc699e77..318c3dc4bc5 100644 --- a/thumbnails/pkg/server/grpc/server.go +++ b/thumbnails/pkg/server/grpc/server.go @@ -4,7 +4,7 @@ import ( "github.com/cs3org/reva/pkg/rgrpc/todo/pool" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" svc "github.com/owncloud/ocis/thumbnails/pkg/service/v0" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/imgsource" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/storage" @@ -30,7 +30,7 @@ func NewService(opts ...Option) grpc.Service { options.Logger.Error().Err(err).Msg("could not get gateway client") return grpc.Service{} } - var thumbnail proto.ThumbnailServiceHandler + var thumbnail thumbnailssvc.ThumbnailServiceHandler { thumbnail = svc.NewService( svc.Config(options.Config), @@ -50,7 +50,7 @@ func NewService(opts ...Option) grpc.Service { thumbnail = svc.NewTracing(thumbnail) } - _ = proto.RegisterThumbnailServiceHandler( + _ = thumbnailssvc.RegisterThumbnailServiceHandler( service.Server(), thumbnail, ) diff --git a/thumbnails/pkg/service/v0/instrument.go b/thumbnails/pkg/service/v0/instrument.go index 1c3e77824e3..fb3b8341074 100644 --- a/thumbnails/pkg/service/v0/instrument.go +++ b/thumbnails/pkg/service/v0/instrument.go @@ -3,13 +3,13 @@ package svc import ( "context" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" "github.com/owncloud/ocis/thumbnails/pkg/metrics" - v0proto "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" "github.com/prometheus/client_golang/prometheus" ) // NewInstrument returns a service that instruments metrics. -func NewInstrument(next v0proto.ThumbnailServiceHandler, metrics *metrics.Metrics) v0proto.ThumbnailServiceHandler { +func NewInstrument(next thumbnailssvc.ThumbnailServiceHandler, metrics *metrics.Metrics) thumbnailssvc.ThumbnailServiceHandler { return instrument{ next: next, metrics: metrics, @@ -17,12 +17,12 @@ func NewInstrument(next v0proto.ThumbnailServiceHandler, metrics *metrics.Metric } type instrument struct { - next v0proto.ThumbnailServiceHandler + next thumbnailssvc.ThumbnailServiceHandler metrics *metrics.Metrics } // GetThumbnail implements the ThumbnailServiceHandler interface. -func (i instrument) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error { +func (i instrument) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, rsp *thumbnailssvc.GetThumbnailResponse) error { timer := prometheus.NewTimer(prometheus.ObserverFunc(func(v float64) { us := v * 1000_000 i.metrics.Latency.WithLabelValues().Observe(us) diff --git a/thumbnails/pkg/service/v0/logging.go b/thumbnails/pkg/service/v0/logging.go index 69f74d133d0..eb04c263fe8 100644 --- a/thumbnails/pkg/service/v0/logging.go +++ b/thumbnails/pkg/service/v0/logging.go @@ -5,11 +5,11 @@ import ( "time" "github.com/owncloud/ocis/ocis-pkg/log" - v0proto "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" ) // NewLogging returns a service that logs messages. -func NewLogging(next v0proto.ThumbnailServiceHandler, logger log.Logger) v0proto.ThumbnailServiceHandler { +func NewLogging(next thumbnailssvc.ThumbnailServiceHandler, logger log.Logger) thumbnailssvc.ThumbnailServiceHandler { return logging{ next: next, logger: logger, @@ -17,12 +17,12 @@ func NewLogging(next v0proto.ThumbnailServiceHandler, logger log.Logger) v0proto } type logging struct { - next v0proto.ThumbnailServiceHandler + next thumbnailssvc.ThumbnailServiceHandler logger log.Logger } // GetThumbnail implements the ThumbnailServiceHandler interface. -func (l logging) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error { +func (l logging) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, rsp *thumbnailssvc.GetThumbnailResponse) error { start := time.Now() err := l.next.GetThumbnail(ctx, req, rsp) diff --git a/thumbnails/pkg/service/v0/service.go b/thumbnails/pkg/service/v0/service.go index 28a0d4045fd..9e7de319236 100644 --- a/thumbnails/pkg/service/v0/service.go +++ b/thumbnails/pkg/service/v0/service.go @@ -12,8 +12,8 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" revactx "github.com/cs3org/reva/pkg/ctx" "github.com/owncloud/ocis/ocis-pkg/log" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" "github.com/owncloud/ocis/thumbnails/pkg/preprocessor" - v0proto "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/imgsource" "github.com/pkg/errors" @@ -22,7 +22,7 @@ import ( ) // NewService returns a service implementation for Service. -func NewService(opts ...Option) v0proto.ThumbnailServiceHandler { +func NewService(opts ...Option) thumbnailssvc.ThumbnailServiceHandler { options := newOptions(opts...) logger := options.Logger resolutions, err := thumbnail.ParseResolutions(options.Config.Thumbnail.Resolutions) @@ -64,8 +64,8 @@ type PreprocessorOpts struct { } // GetThumbnail retrieves a thumbnail for an image -func (g Thumbnail) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error { - _, ok := v0proto.GetThumbnailRequest_ThumbnailType_value[req.ThumbnailType.String()] +func (g Thumbnail) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, rsp *thumbnailssvc.GetThumbnailResponse) error { + _, ok := thumbnailssvc.GetThumbnailRequest_ThumbnailType_value[req.ThumbnailType.String()] if !ok { g.logger.Debug().Str("thumbnail_type", req.ThumbnailType.String()).Msg("unsupported thumbnail type") return nil @@ -96,7 +96,7 @@ func (g Thumbnail) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRe return nil } -func (g Thumbnail) handleCS3Source(ctx context.Context, req *v0proto.GetThumbnailRequest, encoder thumbnail.Encoder) ([]byte, error) { +func (g Thumbnail) handleCS3Source(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, encoder thumbnail.Encoder) ([]byte, error) { src := req.GetCs3Source() sRes, err := g.stat(src.Path, src.Authorization) if err != nil { @@ -135,7 +135,7 @@ func (g Thumbnail) handleCS3Source(ctx context.Context, req *v0proto.GetThumbnai return thumb, nil } -func (g Thumbnail) handleWebdavSource(ctx context.Context, req *v0proto.GetThumbnailRequest, encoder thumbnail.Encoder) ([]byte, error) { +func (g Thumbnail) handleWebdavSource(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, encoder thumbnail.Encoder) ([]byte, error) { src := req.GetWebdavSource() imgURL, err := url.Parse(src.Url) if err != nil { diff --git a/thumbnails/pkg/service/v0/tracing.go b/thumbnails/pkg/service/v0/tracing.go index f13a21e2f39..25256aafb93 100644 --- a/thumbnails/pkg/service/v0/tracing.go +++ b/thumbnails/pkg/service/v0/tracing.go @@ -5,24 +5,24 @@ import ( "go.opentelemetry.io/otel/trace" - v0proto "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" thumbnailsTracing "github.com/owncloud/ocis/thumbnails/pkg/tracing" "go.opentelemetry.io/otel/attribute" ) // NewTracing returns a service that instruments traces. -func NewTracing(next v0proto.ThumbnailServiceHandler) v0proto.ThumbnailServiceHandler { +func NewTracing(next thumbnailssvc.ThumbnailServiceHandler) thumbnailssvc.ThumbnailServiceHandler { return tracing{ next: next, } } type tracing struct { - next v0proto.ThumbnailServiceHandler + next thumbnailssvc.ThumbnailServiceHandler } // GetThumbnail implements the ThumbnailServiceHandler interface. -func (t tracing) GetThumbnail(ctx context.Context, req *v0proto.GetThumbnailRequest, rsp *v0proto.GetThumbnailResponse) error { +func (t tracing) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, rsp *thumbnailssvc.GetThumbnailResponse) error { var span trace.Span if thumbnailsTracing.TraceProvider != nil { diff --git a/webdav/pkg/service/v0/service.go b/webdav/pkg/service/v0/service.go index 64ed700d4e9..e2477ad0c3c 100644 --- a/webdav/pkg/service/v0/service.go +++ b/webdav/pkg/service/v0/service.go @@ -19,7 +19,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/go-chi/chi/v5" - thumbnails "github.com/owncloud/ocis/thumbnails/pkg/proto/v0" + thumbnailsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" "github.com/owncloud/ocis/webdav/pkg/config" "github.com/owncloud/ocis/webdav/pkg/dav/requests" ) @@ -60,7 +61,7 @@ func NewService(opts ...Option) (Service, error) { config: conf, log: options.Logger, mux: m, - thumbnailsClient: thumbnails.NewThumbnailService("com.owncloud.api.thumbnails", grpc.DefaultClient), + thumbnailsClient: thumbnailssvc.NewThumbnailService("com.owncloud.api.thumbnails", grpc.DefaultClient), revaClient: gwc, } @@ -78,7 +79,7 @@ type Webdav struct { config *config.Config log log.Logger mux *chi.Mux - thumbnailsClient thumbnails.ThumbnailService + thumbnailsClient thumbnailssvc.ThumbnailService revaClient gatewayv1beta1.GatewayAPIClient } @@ -109,13 +110,13 @@ func (g Webdav) Thumbnail(w http.ResponseWriter, r *http.Request) { } fullPath := filepath.Join(templates.WithUser(userRes.User, g.config.WebdavNamespace), tr.Filepath) - rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnails.GetThumbnailRequest{ + rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnailssvc.GetThumbnailRequest{ Filepath: strings.TrimLeft(tr.Filepath, "/"), ThumbnailType: extensionToThumbnailType(strings.TrimLeft(tr.Extension, ".")), Width: tr.Width, Height: tr.Height, - Source: &thumbnails.GetThumbnailRequest_Cs3Source{ - Cs3Source: &thumbnails.CS3Source{ + Source: &thumbnailssvc.GetThumbnailRequest_Cs3Source{ + Cs3Source: &thumbnailsmsg.CS3Source{ Path: fullPath, Authorization: t, }, @@ -153,13 +154,13 @@ func (g Webdav) PublicThumbnail(w http.ResponseWriter, r *http.Request) { return } - rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnails.GetThumbnailRequest{ + rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnailssvc.GetThumbnailRequest{ Filepath: strings.TrimLeft(tr.Filepath, "/"), ThumbnailType: extensionToThumbnailType(strings.TrimLeft(tr.Extension, ".")), Width: tr.Width, Height: tr.Height, - Source: &thumbnails.GetThumbnailRequest_WebdavSource{ - WebdavSource: &thumbnails.WebdavSource{ + Source: &thumbnailssvc.GetThumbnailRequest_WebdavSource{ + WebdavSource: &thumbnailsmsg.WebdavSource{ Url: g.config.OcisPublicURL + r.URL.RequestURI(), IsPublicLink: true, PublicLinkToken: tr.PublicLinkToken, @@ -198,13 +199,13 @@ func (g Webdav) PublicThumbnailHead(w http.ResponseWriter, r *http.Request) { return } - rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnails.GetThumbnailRequest{ + rsp, err := g.thumbnailsClient.GetThumbnail(r.Context(), &thumbnailssvc.GetThumbnailRequest{ Filepath: strings.TrimLeft(tr.Filepath, "/"), ThumbnailType: extensionToThumbnailType(strings.TrimLeft(tr.Extension, ".")), Width: tr.Width, Height: tr.Height, - Source: &thumbnails.GetThumbnailRequest_WebdavSource{ - WebdavSource: &thumbnails.WebdavSource{ + Source: &thumbnailssvc.GetThumbnailRequest_WebdavSource{ + WebdavSource: &thumbnailsmsg.WebdavSource{ Url: g.config.OcisPublicURL + r.URL.RequestURI(), IsPublicLink: true, PublicLinkToken: tr.PublicLinkToken, @@ -235,12 +236,12 @@ func (g Webdav) PublicThumbnailHead(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) } -func extensionToThumbnailType(ext string) thumbnails.GetThumbnailRequest_ThumbnailType { +func extensionToThumbnailType(ext string) thumbnailssvc.GetThumbnailRequest_ThumbnailType { switch strings.ToUpper(ext) { case "GIF", "PNG": - return thumbnails.GetThumbnailRequest_PNG + return thumbnailssvc.GetThumbnailRequest_PNG default: - return thumbnails.GetThumbnailRequest_JPG + return thumbnailssvc.GetThumbnailRequest_JPG } } @@ -298,7 +299,7 @@ func (t *thumbnailResponse) Render(w http.ResponseWriter, _ *http.Request) error return err } -func newThumbnailResponse(rsp *thumbnails.GetThumbnailResponse) *thumbnailResponse { +func newThumbnailResponse(rsp *thumbnailssvc.GetThumbnailResponse) *thumbnailResponse { return &thumbnailResponse{ contentType: rsp.Mimetype, thumbnail: rsp.Thumbnail, From e794c623bd142b05c31cd38aaadfbf6d602e6221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 12 Jan 2022 10:38:14 +0100 Subject: [PATCH 06/20] Add proto files for the settings service and include generated code --- .../ocis/messages/settings/v1/grpc.md | 253 +++ .../ocis/services/settings/v1/grpc.md | 286 +++ .../ocis/messages/settings/v1/settings.pb.go | 1978 ++++++++++++++++ .../messages/settings/v1/settings.pb.micro.go | 15 + .../messages/settings/v1/settings.pb.web.go | 587 +++++ .../settings/v1/settings.swagger.json | 43 + .../ocis/services/settings/v1/settings.pb.go | 2004 +++++++++++++++++ .../services/settings/v1/settings.pb.micro.go | 669 ++++++ .../services/settings/v1/settings.pb.web.go | 1329 +++++++++++ .../settings/v1/settings.swagger.json | 1114 +++++++++ .../ocis/messages/settings/v1/settings.proto | 172 ++ .../ocis/services/settings/v1/settings.proto | 257 +++ 12 files changed, 8707 insertions(+) create mode 100644 protogen/docs/extensions/ocis/messages/settings/v1/grpc.md create mode 100644 protogen/docs/extensions/ocis/services/settings/v1/grpc.md create mode 100644 protogen/gen/ocis/messages/settings/v1/settings.pb.go create mode 100644 protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go create mode 100644 protogen/gen/ocis/messages/settings/v1/settings.pb.web.go create mode 100644 protogen/gen/ocis/messages/settings/v1/settings.swagger.json create mode 100644 protogen/gen/ocis/services/settings/v1/settings.pb.go create mode 100644 protogen/gen/ocis/services/settings/v1/settings.pb.micro.go create mode 100644 protogen/gen/ocis/services/settings/v1/settings.pb.web.go create mode 100644 protogen/gen/ocis/services/settings/v1/settings.swagger.json create mode 100644 protogen/proto/ocis/messages/settings/v1/settings.proto create mode 100644 protogen/proto/ocis/services/settings/v1/settings.proto diff --git a/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md b/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md new file mode 100644 index 00000000000..74aa5597602 --- /dev/null +++ b/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md @@ -0,0 +1,253 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/messages/settings/v1/settings.proto + +### Bool + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| default | [bool](#bool) | | | +| label | [string](#string) | | | + +### Bundle + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| name | [string](#string) | | | +| type | [Bundle.Type](#bundletype) | | | +| extension | [string](#string) | | | +| display_name | [string](#string) | | | +| settings | [Setting](#setting) | repeated | | +| resource | [Resource](#resource) | | | + +### Identifier + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| extension | [string](#string) | | | +| bundle | [string](#string) | | | +| setting | [string](#string) | | | + +### Int + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| default | [int64](#int64) | | | +| min | [int64](#int64) | | | +| max | [int64](#int64) | | | +| step | [int64](#int64) | | | +| placeholder | [string](#string) | | | + +### ListOption + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [ListOptionValue](#listoptionvalue) | | | +| default | [bool](#bool) | | | +| display_value | [string](#string) | | | + +### ListOptionValue + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| string_value | [string](#string) | | | +| int_value | [int64](#int64) | | | + +### ListValue + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| values | [ListOptionValue](#listoptionvalue) | repeated | | + +### MultiChoiceList + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| options | [ListOption](#listoption) | repeated | | + +### Permission + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| operation | [Permission.Operation](#permissionoperation) | | | +| constraint | [Permission.Constraint](#permissionconstraint) | | | + +### Resource + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [Resource.Type](#resourcetype) | | | +| id | [string](#string) | | | + +### Setting + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| name | [string](#string) | | | +| display_name | [string](#string) | | | +| description | [string](#string) | | | +| int_value | [Int](#int) | | | +| string_value | [String](#string) | | | +| bool_value | [Bool](#bool) | | | +| single_choice_value | [SingleChoiceList](#singlechoicelist) | | | +| multi_choice_value | [MultiChoiceList](#multichoicelist) | | | +| permission_value | [Permission](#permission) | | | +| resource | [Resource](#resource) | | | + +### SingleChoiceList + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| options | [ListOption](#listoption) | repeated | | + +### String + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| default | [string](#string) | | | +| required | [bool](#bool) | | | +| min_length | [int32](#int32) | | | +| max_length | [int32](#int32) | | | +| placeholder | [string](#string) | | | + +### UserRoleAssignment + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | id is generated upon saving the assignment | +| account_uuid | [string](#string) | | | +| role_id | [string](#string) | | the role_id is a bundle_id internally | + +### Value + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | id is the id of the Value. It is generated on saving it. | +| bundle_id | [string](#string) | | | +| setting_id | [string](#string) | | setting_id is the id of the setting from within its bundle. | +| account_uuid | [string](#string) | | | +| resource | [Resource](#resource) | | | +| bool_value | [bool](#bool) | | | +| int_value | [int64](#int64) | | | +| string_value | [string](#string) | | | +| list_value | [ListValue](#listvalue) | | | + +### ValueWithIdentifier + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| identifier | [Identifier](#identifier) | | | +| value | [Value](#value) | | | + +### Bundle.Type + + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TYPE_UNKNOWN | 0 | | +| TYPE_DEFAULT | 1 | | +| TYPE_ROLE | 2 | | +### Permission.Constraint + + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CONSTRAINT_UNKNOWN | 0 | | +| CONSTRAINT_OWN | 1 | | +| CONSTRAINT_SHARED | 2 | | +| CONSTRAINT_ALL | 3 | | +### Permission.Operation + + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| OPERATION_UNKNOWN | 0 | | +| OPERATION_CREATE | 1 | | +| OPERATION_READ | 2 | | +| OPERATION_UPDATE | 3 | | +| OPERATION_DELETE | 4 | | +| OPERATION_WRITE | 5 | WRITE is a combination of CREATE and UPDATE | +| OPERATION_READWRITE | 6 | READWRITE is a combination of READ and WRITE | +### Resource.Type + + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TYPE_UNKNOWN | 0 | | +| TYPE_SYSTEM | 1 | | +| TYPE_FILE | 2 | | +| TYPE_SHARE | 3 | | +| TYPE_SETTING | 4 | | +| TYPE_BUNDLE | 5 | | +| TYPE_USER | 6 | | +| TYPE_GROUP | 7 | | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/docs/extensions/ocis/services/settings/v1/grpc.md b/protogen/docs/extensions/ocis/services/settings/v1/grpc.md new file mode 100644 index 00000000000..7f83d3a8c5a --- /dev/null +++ b/protogen/docs/extensions/ocis/services/settings/v1/grpc.md @@ -0,0 +1,286 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/services/settings/v1/settings.proto + +### AddSettingToBundleRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle_id | [string](#string) | | | +| setting | [ocis.messages.settings.v1.Setting](../../../messages/settings/v1/grpc.md#setting) | | | + +### AddSettingToBundleResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| setting | [ocis.messages.settings.v1.Setting](../../../messages/settings/v1/grpc.md#setting) | | | + +### AssignRoleToUserRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account_uuid | [string](#string) | | | +| role_id | [string](#string) | | the role_id is a bundle_id internally | + +### AssignRoleToUserResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| assignment | [ocis.messages.settings.v1.UserRoleAssignment](../../../messages/settings/v1/grpc.md#userroleassignment) | | | + +### GetBundleRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle_id | [string](#string) | | | + +### GetBundleResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | + +### GetPermissionByIDRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| permission_id | [string](#string) | | | + +### GetPermissionByIDResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| permission | [ocis.messages.settings.v1.Permission](../../../messages/settings/v1/grpc.md#permission) | | | + +### GetValueByUniqueIdentifiersRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account_uuid | [string](#string) | | | +| setting_id | [string](#string) | | | + +### GetValueRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### GetValueResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | | | + +### ListBundlesRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle_ids | [string](#string) | repeated | | + +### ListBundlesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundles | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | repeated | | + +### ListPermissionsByResourceRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| resource | [ocis.messages.settings.v1.Resource](../../../messages/settings/v1/grpc.md#resource) | | | + +### ListPermissionsByResourceResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| permissions | [ocis.messages.settings.v1.Permission](../../../messages/settings/v1/grpc.md#permission) | repeated | | + +### ListRoleAssignmentsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| account_uuid | [string](#string) | | | + +### ListRoleAssignmentsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| assignments | [ocis.messages.settings.v1.UserRoleAssignment](../../../messages/settings/v1/grpc.md#userroleassignment) | repeated | | + +### ListValuesRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle_id | [string](#string) | | | +| account_uuid | [string](#string) | | | + +### ListValuesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| values | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | repeated | | + +### RemoveRoleFromUserRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + +### RemoveSettingFromBundleRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle_id | [string](#string) | | | +| setting_id | [string](#string) | | | + +### SaveBundleRequest + +--- +requests and responses for settings bundles +--- + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | + +### SaveBundleResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | + +### SaveValueRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [ocis.messages.settings.v1.Value](../../../messages/settings/v1/grpc.md#value) | | | + +### SaveValueResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| value | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | | | + + +### BundleService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| SaveBundle | [SaveBundleRequest](#savebundlerequest) | [SaveBundleResponse](#savebundleresponse) | | +| GetBundle | [GetBundleRequest](#getbundlerequest) | [GetBundleResponse](#getbundleresponse) | | +| ListBundles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | | +| AddSettingToBundle | [AddSettingToBundleRequest](#addsettingtobundlerequest) | [AddSettingToBundleResponse](#addsettingtobundleresponse) | | +| RemoveSettingFromBundle | [RemoveSettingFromBundleRequest](#removesettingfrombundlerequest) | [.google.protobuf.Empty](#googleprotobufempty) | | + +### PermissionService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListPermissionsByResource | [ListPermissionsByResourceRequest](#listpermissionsbyresourcerequest) | [ListPermissionsByResourceResponse](#listpermissionsbyresourceresponse) | | +| GetPermissionByID | [GetPermissionByIDRequest](#getpermissionbyidrequest) | [GetPermissionByIDResponse](#getpermissionbyidresponse) | | + +### RoleService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListRoles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | | +| ListRoleAssignments | [ListRoleAssignmentsRequest](#listroleassignmentsrequest) | [ListRoleAssignmentsResponse](#listroleassignmentsresponse) | | +| AssignRoleToUser | [AssignRoleToUserRequest](#assignroletouserrequest) | [AssignRoleToUserResponse](#assignroletouserresponse) | | +| RemoveRoleFromUser | [RemoveRoleFromUserRequest](#removerolefromuserrequest) | [.google.protobuf.Empty](#googleprotobufempty) | | + +### ValueService + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| SaveValue | [SaveValueRequest](#savevaluerequest) | [SaveValueResponse](#savevalueresponse) | | +| GetValue | [GetValueRequest](#getvaluerequest) | [GetValueResponse](#getvalueresponse) | | +| ListValues | [ListValuesRequest](#listvaluesrequest) | [ListValuesResponse](#listvaluesresponse) | | +| GetValueByUniqueIdentifiers | [GetValueByUniqueIdentifiersRequest](#getvaluebyuniqueidentifiersrequest) | [GetValueResponse](#getvalueresponse) | | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.go b/protogen/gen/ocis/messages/settings/v1/settings.pb.go new file mode 100644 index 00000000000..1b7630c7038 --- /dev/null +++ b/protogen/gen/ocis/messages/settings/v1/settings.pb.go @@ -0,0 +1,1978 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/messages/settings/v1/settings.proto + +package v1 + +import ( + 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) +) + +type Resource_Type int32 + +const ( + Resource_TYPE_UNKNOWN Resource_Type = 0 + Resource_TYPE_SYSTEM Resource_Type = 1 + Resource_TYPE_FILE Resource_Type = 2 + Resource_TYPE_SHARE Resource_Type = 3 + Resource_TYPE_SETTING Resource_Type = 4 + Resource_TYPE_BUNDLE Resource_Type = 5 + Resource_TYPE_USER Resource_Type = 6 + Resource_TYPE_GROUP Resource_Type = 7 +) + +// Enum value maps for Resource_Type. +var ( + Resource_Type_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TYPE_SYSTEM", + 2: "TYPE_FILE", + 3: "TYPE_SHARE", + 4: "TYPE_SETTING", + 5: "TYPE_BUNDLE", + 6: "TYPE_USER", + 7: "TYPE_GROUP", + } + Resource_Type_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TYPE_SYSTEM": 1, + "TYPE_FILE": 2, + "TYPE_SHARE": 3, + "TYPE_SETTING": 4, + "TYPE_BUNDLE": 5, + "TYPE_USER": 6, + "TYPE_GROUP": 7, + } +) + +func (x Resource_Type) Enum() *Resource_Type { + p := new(Resource_Type) + *p = x + return p +} + +func (x Resource_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Resource_Type) Descriptor() protoreflect.EnumDescriptor { + return file_ocis_messages_settings_v1_settings_proto_enumTypes[0].Descriptor() +} + +func (Resource_Type) Type() protoreflect.EnumType { + return &file_ocis_messages_settings_v1_settings_proto_enumTypes[0] +} + +func (x Resource_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Resource_Type.Descriptor instead. +func (Resource_Type) EnumDescriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{3, 0} +} + +type Bundle_Type int32 + +const ( + Bundle_TYPE_UNKNOWN Bundle_Type = 0 + Bundle_TYPE_DEFAULT Bundle_Type = 1 + Bundle_TYPE_ROLE Bundle_Type = 2 +) + +// Enum value maps for Bundle_Type. +var ( + Bundle_Type_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TYPE_DEFAULT", + 2: "TYPE_ROLE", + } + Bundle_Type_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TYPE_DEFAULT": 1, + "TYPE_ROLE": 2, + } +) + +func (x Bundle_Type) Enum() *Bundle_Type { + p := new(Bundle_Type) + *p = x + return p +} + +func (x Bundle_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Bundle_Type) Descriptor() protoreflect.EnumDescriptor { + return file_ocis_messages_settings_v1_settings_proto_enumTypes[1].Descriptor() +} + +func (Bundle_Type) Type() protoreflect.EnumType { + return &file_ocis_messages_settings_v1_settings_proto_enumTypes[1] +} + +func (x Bundle_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Bundle_Type.Descriptor instead. +func (Bundle_Type) EnumDescriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{4, 0} +} + +type Permission_Operation int32 + +const ( + Permission_OPERATION_UNKNOWN Permission_Operation = 0 + Permission_OPERATION_CREATE Permission_Operation = 1 + Permission_OPERATION_READ Permission_Operation = 2 + Permission_OPERATION_UPDATE Permission_Operation = 3 + Permission_OPERATION_DELETE Permission_Operation = 4 + Permission_OPERATION_WRITE Permission_Operation = 5 // WRITE is a combination of CREATE and UPDATE + Permission_OPERATION_READWRITE Permission_Operation = 6 // READWRITE is a combination of READ and WRITE +) + +// Enum value maps for Permission_Operation. +var ( + Permission_Operation_name = map[int32]string{ + 0: "OPERATION_UNKNOWN", + 1: "OPERATION_CREATE", + 2: "OPERATION_READ", + 3: "OPERATION_UPDATE", + 4: "OPERATION_DELETE", + 5: "OPERATION_WRITE", + 6: "OPERATION_READWRITE", + } + Permission_Operation_value = map[string]int32{ + "OPERATION_UNKNOWN": 0, + "OPERATION_CREATE": 1, + "OPERATION_READ": 2, + "OPERATION_UPDATE": 3, + "OPERATION_DELETE": 4, + "OPERATION_WRITE": 5, + "OPERATION_READWRITE": 6, + } +) + +func (x Permission_Operation) Enum() *Permission_Operation { + p := new(Permission_Operation) + *p = x + return p +} + +func (x Permission_Operation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Permission_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_ocis_messages_settings_v1_settings_proto_enumTypes[2].Descriptor() +} + +func (Permission_Operation) Type() protoreflect.EnumType { + return &file_ocis_messages_settings_v1_settings_proto_enumTypes[2] +} + +func (x Permission_Operation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Permission_Operation.Descriptor instead. +func (Permission_Operation) EnumDescriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12, 0} +} + +type Permission_Constraint int32 + +const ( + Permission_CONSTRAINT_UNKNOWN Permission_Constraint = 0 + Permission_CONSTRAINT_OWN Permission_Constraint = 1 + Permission_CONSTRAINT_SHARED Permission_Constraint = 2 + Permission_CONSTRAINT_ALL Permission_Constraint = 3 +) + +// Enum value maps for Permission_Constraint. +var ( + Permission_Constraint_name = map[int32]string{ + 0: "CONSTRAINT_UNKNOWN", + 1: "CONSTRAINT_OWN", + 2: "CONSTRAINT_SHARED", + 3: "CONSTRAINT_ALL", + } + Permission_Constraint_value = map[string]int32{ + "CONSTRAINT_UNKNOWN": 0, + "CONSTRAINT_OWN": 1, + "CONSTRAINT_SHARED": 2, + "CONSTRAINT_ALL": 3, + } +) + +func (x Permission_Constraint) Enum() *Permission_Constraint { + p := new(Permission_Constraint) + *p = x + return p +} + +func (x Permission_Constraint) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Permission_Constraint) Descriptor() protoreflect.EnumDescriptor { + return file_ocis_messages_settings_v1_settings_proto_enumTypes[3].Descriptor() +} + +func (Permission_Constraint) Type() protoreflect.EnumType { + return &file_ocis_messages_settings_v1_settings_proto_enumTypes[3] +} + +func (x Permission_Constraint) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Permission_Constraint.Descriptor instead. +func (Permission_Constraint) EnumDescriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12, 1} +} + +type ValueWithIdentifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier *Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ValueWithIdentifier) Reset() { + *x = ValueWithIdentifier{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValueWithIdentifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueWithIdentifier) ProtoMessage() {} + +func (x *ValueWithIdentifier) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 ValueWithIdentifier.ProtoReflect.Descriptor instead. +func (*ValueWithIdentifier) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{0} +} + +func (x *ValueWithIdentifier) GetIdentifier() *Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *ValueWithIdentifier) GetValue() *Value { + if x != nil { + return x.Value + } + return nil +} + +type Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extension string `protobuf:"bytes,1,opt,name=extension,proto3" json:"extension,omitempty"` + Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` + Setting string `protobuf:"bytes,3,opt,name=setting,proto3" json:"setting,omitempty"` +} + +func (x *Identifier) Reset() { + *x = Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identifier) ProtoMessage() {} + +func (x *Identifier) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Identifier.ProtoReflect.Descriptor instead. +func (*Identifier) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{1} +} + +func (x *Identifier) GetExtension() string { + if x != nil { + return x.Extension + } + return "" +} + +func (x *Identifier) GetBundle() string { + if x != nil { + return x.Bundle + } + return "" +} + +func (x *Identifier) GetSetting() string { + if x != nil { + return x.Setting + } + return "" +} + +type UserRoleAssignment struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is generated upon saving the assignment + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AccountUuid string `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` + // the role_id is a bundle_id internally + RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` +} + +func (x *UserRoleAssignment) Reset() { + *x = UserRoleAssignment{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserRoleAssignment) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserRoleAssignment) ProtoMessage() {} + +func (x *UserRoleAssignment) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 UserRoleAssignment.ProtoReflect.Descriptor instead. +func (*UserRoleAssignment) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{2} +} + +func (x *UserRoleAssignment) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UserRoleAssignment) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +func (x *UserRoleAssignment) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +type Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type Resource_Type `protobuf:"varint,1,opt,name=type,proto3,enum=ocis.messages.settings.v1.Resource_Type" json:"type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Resource) Reset() { + *x = Resource{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resource) ProtoMessage() {} + +func (x *Resource) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Resource.ProtoReflect.Descriptor instead. +func (*Resource) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{3} +} + +func (x *Resource) GetType() Resource_Type { + if x != nil { + return x.Type + } + return Resource_TYPE_UNKNOWN +} + +func (x *Resource) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type Bundle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=ocis.messages.settings.v1.Bundle_Type" json:"type,omitempty"` + Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"` + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Settings []*Setting `protobuf:"bytes,6,rep,name=settings,proto3" json:"settings,omitempty"` + Resource *Resource `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` +} + +func (x *Bundle) Reset() { + *x = Bundle{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bundle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bundle) ProtoMessage() {} + +func (x *Bundle) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Bundle.ProtoReflect.Descriptor instead. +func (*Bundle) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{4} +} + +func (x *Bundle) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Bundle) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Bundle) GetType() Bundle_Type { + if x != nil { + return x.Type + } + return Bundle_TYPE_UNKNOWN +} + +func (x *Bundle) GetExtension() string { + if x != nil { + return x.Extension + } + return "" +} + +func (x *Bundle) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Bundle) GetSettings() []*Setting { + if x != nil { + return x.Settings + } + return nil +} + +func (x *Bundle) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +type Setting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // Types that are assignable to Value: + // *Setting_IntValue + // *Setting_StringValue + // *Setting_BoolValue + // *Setting_SingleChoiceValue + // *Setting_MultiChoiceValue + // *Setting_PermissionValue + Value isSetting_Value `protobuf_oneof:"value"` + Resource *Resource `protobuf:"bytes,11,opt,name=resource,proto3" json:"resource,omitempty"` +} + +func (x *Setting) Reset() { + *x = Setting{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Setting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Setting) ProtoMessage() {} + +func (x *Setting) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Setting.ProtoReflect.Descriptor instead. +func (*Setting) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{5} +} + +func (x *Setting) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Setting) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Setting) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Setting) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (m *Setting) GetValue() isSetting_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *Setting) GetIntValue() *Int { + if x, ok := x.GetValue().(*Setting_IntValue); ok { + return x.IntValue + } + return nil +} + +func (x *Setting) GetStringValue() *String { + if x, ok := x.GetValue().(*Setting_StringValue); ok { + return x.StringValue + } + return nil +} + +func (x *Setting) GetBoolValue() *Bool { + if x, ok := x.GetValue().(*Setting_BoolValue); ok { + return x.BoolValue + } + return nil +} + +func (x *Setting) GetSingleChoiceValue() *SingleChoiceList { + if x, ok := x.GetValue().(*Setting_SingleChoiceValue); ok { + return x.SingleChoiceValue + } + return nil +} + +func (x *Setting) GetMultiChoiceValue() *MultiChoiceList { + if x, ok := x.GetValue().(*Setting_MultiChoiceValue); ok { + return x.MultiChoiceValue + } + return nil +} + +func (x *Setting) GetPermissionValue() *Permission { + if x, ok := x.GetValue().(*Setting_PermissionValue); ok { + return x.PermissionValue + } + return nil +} + +func (x *Setting) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +type isSetting_Value interface { + isSetting_Value() +} + +type Setting_IntValue struct { + IntValue *Int `protobuf:"bytes,5,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type Setting_StringValue struct { + StringValue *String `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type Setting_BoolValue struct { + BoolValue *Bool `protobuf:"bytes,7,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type Setting_SingleChoiceValue struct { + SingleChoiceValue *SingleChoiceList `protobuf:"bytes,8,opt,name=single_choice_value,json=singleChoiceValue,proto3,oneof"` +} + +type Setting_MultiChoiceValue struct { + MultiChoiceValue *MultiChoiceList `protobuf:"bytes,9,opt,name=multi_choice_value,json=multiChoiceValue,proto3,oneof"` +} + +type Setting_PermissionValue struct { + PermissionValue *Permission `protobuf:"bytes,10,opt,name=permission_value,json=permissionValue,proto3,oneof"` +} + +func (*Setting_IntValue) isSetting_Value() {} + +func (*Setting_StringValue) isSetting_Value() {} + +func (*Setting_BoolValue) isSetting_Value() {} + +func (*Setting_SingleChoiceValue) isSetting_Value() {} + +func (*Setting_MultiChoiceValue) isSetting_Value() {} + +func (*Setting_PermissionValue) isSetting_Value() {} + +type Int struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Default int64 `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` + Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty"` + Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` + Step int64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` + Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` +} + +func (x *Int) Reset() { + *x = Int{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int) ProtoMessage() {} + +func (x *Int) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Int.ProtoReflect.Descriptor instead. +func (*Int) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{6} +} + +func (x *Int) GetDefault() int64 { + if x != nil { + return x.Default + } + return 0 +} + +func (x *Int) GetMin() int64 { + if x != nil { + return x.Min + } + return 0 +} + +func (x *Int) GetMax() int64 { + if x != nil { + return x.Max + } + return 0 +} + +func (x *Int) GetStep() int64 { + if x != nil { + return x.Step + } + return 0 +} + +func (x *Int) GetPlaceholder() string { + if x != nil { + return x.Placeholder + } + return "" +} + +type String struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + MinLength int32 `protobuf:"varint,3,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + MaxLength int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` +} + +func (x *String) Reset() { + *x = String{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *String) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*String) ProtoMessage() {} + +func (x *String) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 String.ProtoReflect.Descriptor instead. +func (*String) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{7} +} + +func (x *String) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *String) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *String) GetMinLength() int32 { + if x != nil { + return x.MinLength + } + return 0 +} + +func (x *String) GetMaxLength() int32 { + if x != nil { + return x.MaxLength + } + return 0 +} + +func (x *String) GetPlaceholder() string { + if x != nil { + return x.Placeholder + } + return "" +} + +type Bool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` +} + +func (x *Bool) Reset() { + *x = Bool{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Bool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Bool) ProtoMessage() {} + +func (x *Bool) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Bool.ProtoReflect.Descriptor instead. +func (*Bool) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{8} +} + +func (x *Bool) GetDefault() bool { + if x != nil { + return x.Default + } + return false +} + +func (x *Bool) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +type SingleChoiceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` +} + +func (x *SingleChoiceList) Reset() { + *x = SingleChoiceList{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SingleChoiceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleChoiceList) ProtoMessage() {} + +func (x *SingleChoiceList) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 SingleChoiceList.ProtoReflect.Descriptor instead. +func (*SingleChoiceList) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{9} +} + +func (x *SingleChoiceList) GetOptions() []*ListOption { + if x != nil { + return x.Options + } + return nil +} + +type MultiChoiceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` +} + +func (x *MultiChoiceList) Reset() { + *x = MultiChoiceList{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MultiChoiceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiChoiceList) ProtoMessage() {} + +func (x *MultiChoiceList) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 MultiChoiceList.ProtoReflect.Descriptor instead. +func (*MultiChoiceList) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{10} +} + +func (x *MultiChoiceList) GetOptions() []*ListOption { + if x != nil { + return x.Options + } + return nil +} + +type ListOption struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *ListOptionValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty"` + DisplayValue string `protobuf:"bytes,3,opt,name=display_value,json=displayValue,proto3" json:"display_value,omitempty"` +} + +func (x *ListOption) Reset() { + *x = ListOption{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOption) ProtoMessage() {} + +func (x *ListOption) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 ListOption.ProtoReflect.Descriptor instead. +func (*ListOption) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{11} +} + +func (x *ListOption) GetValue() *ListOptionValue { + if x != nil { + return x.Value + } + return nil +} + +func (x *ListOption) GetDefault() bool { + if x != nil { + return x.Default + } + return false +} + +func (x *ListOption) GetDisplayValue() string { + if x != nil { + return x.DisplayValue + } + return "" +} + +type Permission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=ocis.messages.settings.v1.Permission_Operation" json:"operation,omitempty"` + Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=ocis.messages.settings.v1.Permission_Constraint" json:"constraint,omitempty"` +} + +func (x *Permission) Reset() { + *x = Permission{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Permission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Permission) ProtoMessage() {} + +func (x *Permission) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Permission.ProtoReflect.Descriptor instead. +func (*Permission) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12} +} + +func (x *Permission) GetOperation() Permission_Operation { + if x != nil { + return x.Operation + } + return Permission_OPERATION_UNKNOWN +} + +func (x *Permission) GetConstraint() Permission_Constraint { + if x != nil { + return x.Constraint + } + return Permission_CONSTRAINT_UNKNOWN +} + +type Value struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the id of the Value. It is generated on saving it. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` + // setting_id is the id of the setting from within its bundle. + SettingId string `protobuf:"bytes,3,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` + AccountUuid string `protobuf:"bytes,4,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` + Resource *Resource `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` + // Types that are assignable to Value: + // *Value_BoolValue + // *Value_IntValue + // *Value_StringValue + // *Value_ListValue + Value isValue_Value `protobuf_oneof:"value"` +} + +func (x *Value) Reset() { + *x = Value{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Value) ProtoMessage() {} + +func (x *Value) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_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 Value.ProtoReflect.Descriptor instead. +func (*Value) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{13} +} + +func (x *Value) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Value) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +func (x *Value) GetSettingId() string { + if x != nil { + return x.SettingId + } + return "" +} + +func (x *Value) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +func (x *Value) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (m *Value) GetValue() isValue_Value { + if m != nil { + return m.Value + } + return nil +} + +func (x *Value) GetBoolValue() bool { + if x, ok := x.GetValue().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (x *Value) GetIntValue() int64 { + if x, ok := x.GetValue().(*Value_IntValue); ok { + return x.IntValue + } + return 0 +} + +func (x *Value) GetStringValue() string { + if x, ok := x.GetValue().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *Value) GetListValue() *ListValue { + if x, ok := x.GetValue().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +type isValue_Value interface { + isValue_Value() +} + +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type Value_IntValue struct { + IntValue int64 `protobuf:"varint,7,opt,name=int_value,json=intValue,proto3,oneof"` +} + +type Value_StringValue struct { + StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,9,opt,name=list_value,json=listValue,proto3,oneof"` +} + +func (*Value_BoolValue) isValue_Value() {} + +func (*Value_IntValue) isValue_Value() {} + +func (*Value_StringValue) isValue_Value() {} + +func (*Value_ListValue) isValue_Value() {} + +type ListValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []*ListOptionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ListValue) Reset() { + *x = ListValue{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListValue) ProtoMessage() {} + +func (x *ListValue) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[14] + 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 ListValue.ProtoReflect.Descriptor instead. +func (*ListValue) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{14} +} + +func (x *ListValue) GetValues() []*ListOptionValue { + if x != nil { + return x.Values + } + return nil +} + +type ListOptionValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Option: + // *ListOptionValue_StringValue + // *ListOptionValue_IntValue + Option isListOptionValue_Option `protobuf_oneof:"option"` +} + +func (x *ListOptionValue) Reset() { + *x = ListOptionValue{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOptionValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOptionValue) ProtoMessage() {} + +func (x *ListOptionValue) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[15] + 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 ListOptionValue.ProtoReflect.Descriptor instead. +func (*ListOptionValue) Descriptor() ([]byte, []int) { + return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{15} +} + +func (m *ListOptionValue) GetOption() isListOptionValue_Option { + if m != nil { + return m.Option + } + return nil +} + +func (x *ListOptionValue) GetStringValue() string { + if x, ok := x.GetOption().(*ListOptionValue_StringValue); ok { + return x.StringValue + } + return "" +} + +func (x *ListOptionValue) GetIntValue() int64 { + if x, ok := x.GetOption().(*ListOptionValue_IntValue); ok { + return x.IntValue + } + return 0 +} + +type isListOptionValue_Option interface { + isListOptionValue_Option() +} + +type ListOptionValue_StringValue struct { + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type ListOptionValue_IntValue struct { + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` +} + +func (*ListOptionValue_StringValue) isListOptionValue_Option() {} + +func (*ListOptionValue_IntValue) isListOptionValue_Option() {} + +var File_ocis_messages_settings_v1_settings_proto protoreflect.FileDescriptor + +var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, + 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x45, 0x0a, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5c, 0x0a, 0x0a, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x60, 0x0a, 0x12, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, + 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xe5, 0x01, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, + 0x4d, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, + 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, + 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x55, 0x4e, + 0x44, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, + 0x45, 0x52, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, + 0x55, 0x50, 0x10, 0x07, 0x22, 0xe5, 0x02, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x02, 0x22, 0x94, 0x05, 0x0a, + 0x07, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, + 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5d, 0x0a, 0x13, 0x73, 0x69, + 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, + 0x6f, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x52, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x20, 0x0a, 0x0b, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x22, 0x9e, + 0x01, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, + 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x22, + 0x36, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x53, 0x0a, 0x10, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0f, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x8d, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0xbb, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x4d, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x22, 0xa6, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, + 0x0a, 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, + 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, + 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4f, + 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, + 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, + 0x41, 0x44, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x06, 0x22, 0x63, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4e, 0x53, 0x54, + 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x57, + 0x4e, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, + 0x54, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, + 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x03, 0x22, 0xec, + 0x02, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, + 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, + 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, + 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, + 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x5f, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, + 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_messages_settings_v1_settings_proto_rawDescOnce sync.Once + file_ocis_messages_settings_v1_settings_proto_rawDescData = file_ocis_messages_settings_v1_settings_proto_rawDesc +) + +func file_ocis_messages_settings_v1_settings_proto_rawDescGZIP() []byte { + file_ocis_messages_settings_v1_settings_proto_rawDescOnce.Do(func() { + file_ocis_messages_settings_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_settings_v1_settings_proto_rawDescData) + }) + return file_ocis_messages_settings_v1_settings_proto_rawDescData +} + +var file_ocis_messages_settings_v1_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_ocis_messages_settings_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_ocis_messages_settings_v1_settings_proto_goTypes = []interface{}{ + (Resource_Type)(0), // 0: ocis.messages.settings.v1.Resource.Type + (Bundle_Type)(0), // 1: ocis.messages.settings.v1.Bundle.Type + (Permission_Operation)(0), // 2: ocis.messages.settings.v1.Permission.Operation + (Permission_Constraint)(0), // 3: ocis.messages.settings.v1.Permission.Constraint + (*ValueWithIdentifier)(nil), // 4: ocis.messages.settings.v1.ValueWithIdentifier + (*Identifier)(nil), // 5: ocis.messages.settings.v1.Identifier + (*UserRoleAssignment)(nil), // 6: ocis.messages.settings.v1.UserRoleAssignment + (*Resource)(nil), // 7: ocis.messages.settings.v1.Resource + (*Bundle)(nil), // 8: ocis.messages.settings.v1.Bundle + (*Setting)(nil), // 9: ocis.messages.settings.v1.Setting + (*Int)(nil), // 10: ocis.messages.settings.v1.Int + (*String)(nil), // 11: ocis.messages.settings.v1.String + (*Bool)(nil), // 12: ocis.messages.settings.v1.Bool + (*SingleChoiceList)(nil), // 13: ocis.messages.settings.v1.SingleChoiceList + (*MultiChoiceList)(nil), // 14: ocis.messages.settings.v1.MultiChoiceList + (*ListOption)(nil), // 15: ocis.messages.settings.v1.ListOption + (*Permission)(nil), // 16: ocis.messages.settings.v1.Permission + (*Value)(nil), // 17: ocis.messages.settings.v1.Value + (*ListValue)(nil), // 18: ocis.messages.settings.v1.ListValue + (*ListOptionValue)(nil), // 19: ocis.messages.settings.v1.ListOptionValue +} +var file_ocis_messages_settings_v1_settings_proto_depIdxs = []int32{ + 5, // 0: ocis.messages.settings.v1.ValueWithIdentifier.identifier:type_name -> ocis.messages.settings.v1.Identifier + 17, // 1: ocis.messages.settings.v1.ValueWithIdentifier.value:type_name -> ocis.messages.settings.v1.Value + 0, // 2: ocis.messages.settings.v1.Resource.type:type_name -> ocis.messages.settings.v1.Resource.Type + 1, // 3: ocis.messages.settings.v1.Bundle.type:type_name -> ocis.messages.settings.v1.Bundle.Type + 9, // 4: ocis.messages.settings.v1.Bundle.settings:type_name -> ocis.messages.settings.v1.Setting + 7, // 5: ocis.messages.settings.v1.Bundle.resource:type_name -> ocis.messages.settings.v1.Resource + 10, // 6: ocis.messages.settings.v1.Setting.int_value:type_name -> ocis.messages.settings.v1.Int + 11, // 7: ocis.messages.settings.v1.Setting.string_value:type_name -> ocis.messages.settings.v1.String + 12, // 8: ocis.messages.settings.v1.Setting.bool_value:type_name -> ocis.messages.settings.v1.Bool + 13, // 9: ocis.messages.settings.v1.Setting.single_choice_value:type_name -> ocis.messages.settings.v1.SingleChoiceList + 14, // 10: ocis.messages.settings.v1.Setting.multi_choice_value:type_name -> ocis.messages.settings.v1.MultiChoiceList + 16, // 11: ocis.messages.settings.v1.Setting.permission_value:type_name -> ocis.messages.settings.v1.Permission + 7, // 12: ocis.messages.settings.v1.Setting.resource:type_name -> ocis.messages.settings.v1.Resource + 15, // 13: ocis.messages.settings.v1.SingleChoiceList.options:type_name -> ocis.messages.settings.v1.ListOption + 15, // 14: ocis.messages.settings.v1.MultiChoiceList.options:type_name -> ocis.messages.settings.v1.ListOption + 19, // 15: ocis.messages.settings.v1.ListOption.value:type_name -> ocis.messages.settings.v1.ListOptionValue + 2, // 16: ocis.messages.settings.v1.Permission.operation:type_name -> ocis.messages.settings.v1.Permission.Operation + 3, // 17: ocis.messages.settings.v1.Permission.constraint:type_name -> ocis.messages.settings.v1.Permission.Constraint + 7, // 18: ocis.messages.settings.v1.Value.resource:type_name -> ocis.messages.settings.v1.Resource + 18, // 19: ocis.messages.settings.v1.Value.list_value:type_name -> ocis.messages.settings.v1.ListValue + 19, // 20: ocis.messages.settings.v1.ListValue.values:type_name -> ocis.messages.settings.v1.ListOptionValue + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_ocis_messages_settings_v1_settings_proto_init() } +func file_ocis_messages_settings_v1_settings_proto_init() { + if File_ocis_messages_settings_v1_settings_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_messages_settings_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueWithIdentifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserRoleAssignment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bundle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Setting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*String); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Bool); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SingleChoiceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiChoiceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOption); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Permission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Value); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOptionValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*Setting_IntValue)(nil), + (*Setting_StringValue)(nil), + (*Setting_BoolValue)(nil), + (*Setting_SingleChoiceValue)(nil), + (*Setting_MultiChoiceValue)(nil), + (*Setting_PermissionValue)(nil), + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[13].OneofWrappers = []interface{}{ + (*Value_BoolValue)(nil), + (*Value_IntValue)(nil), + (*Value_StringValue)(nil), + (*Value_ListValue)(nil), + } + file_ocis_messages_settings_v1_settings_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*ListOptionValue_StringValue)(nil), + (*ListOptionValue_IntValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ocis_messages_settings_v1_settings_proto_rawDesc, + NumEnums: 4, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ocis_messages_settings_v1_settings_proto_goTypes, + DependencyIndexes: file_ocis_messages_settings_v1_settings_proto_depIdxs, + EnumInfos: file_ocis_messages_settings_v1_settings_proto_enumTypes, + MessageInfos: file_ocis_messages_settings_v1_settings_proto_msgTypes, + }.Build() + File_ocis_messages_settings_v1_settings_proto = out.File + file_ocis_messages_settings_v1_settings_proto_rawDesc = nil + file_ocis_messages_settings_v1_settings_proto_goTypes = nil + file_ocis_messages_settings_v1_settings_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go b/protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go new file mode 100644 index 00000000000..8061b393cfc --- /dev/null +++ b/protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/messages/settings/v1/settings.proto + +package v1 + +import ( + fmt "fmt" + proto "google.golang.org/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.web.go b/protogen/gen/ocis/messages/settings/v1/settings.pb.web.go new file mode 100644 index 00000000000..b8e8615a569 --- /dev/null +++ b/protogen/gen/ocis/messages/settings/v1/settings.pb.web.go @@ -0,0 +1,587 @@ +// Code generated by protoc-gen-microweb. DO NOT EDIT. +// source: v1.proto + +package v1 + +import ( + "bytes" + "encoding/json" + + "github.com/golang/protobuf/jsonpb" +) + +// ValueWithIdentifierJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ValueWithIdentifier. This struct is safe to replace or modify but +// should not be done so concurrently. +var ValueWithIdentifierJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ValueWithIdentifier) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ValueWithIdentifierJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ValueWithIdentifier)(nil) + +// ValueWithIdentifierJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ValueWithIdentifier. This struct is safe to replace or modify but +// should not be done so concurrently. +var ValueWithIdentifierJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ValueWithIdentifier) UnmarshalJSON(b []byte) error { + return ValueWithIdentifierJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ValueWithIdentifier)(nil) + +// IdentifierJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Identifier. This struct is safe to replace or modify but +// should not be done so concurrently. +var IdentifierJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Identifier) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := IdentifierJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Identifier)(nil) + +// IdentifierJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Identifier. This struct is safe to replace or modify but +// should not be done so concurrently. +var IdentifierJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Identifier) UnmarshalJSON(b []byte) error { + return IdentifierJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Identifier)(nil) + +// UserRoleAssignmentJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of UserRoleAssignment. This struct is safe to replace or modify but +// should not be done so concurrently. +var UserRoleAssignmentJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *UserRoleAssignment) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := UserRoleAssignmentJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*UserRoleAssignment)(nil) + +// UserRoleAssignmentJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of UserRoleAssignment. This struct is safe to replace or modify but +// should not be done so concurrently. +var UserRoleAssignmentJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *UserRoleAssignment) UnmarshalJSON(b []byte) error { + return UserRoleAssignmentJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*UserRoleAssignment)(nil) + +// ResourceJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Resource. This struct is safe to replace or modify but +// should not be done so concurrently. +var ResourceJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Resource) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ResourceJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Resource)(nil) + +// ResourceJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Resource. This struct is safe to replace or modify but +// should not be done so concurrently. +var ResourceJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Resource) UnmarshalJSON(b []byte) error { + return ResourceJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Resource)(nil) + +// BundleJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Bundle. This struct is safe to replace or modify but +// should not be done so concurrently. +var BundleJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Bundle) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := BundleJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Bundle)(nil) + +// BundleJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Bundle. This struct is safe to replace or modify but +// should not be done so concurrently. +var BundleJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Bundle) UnmarshalJSON(b []byte) error { + return BundleJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Bundle)(nil) + +// SettingJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Setting. This struct is safe to replace or modify but +// should not be done so concurrently. +var SettingJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Setting) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SettingJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Setting)(nil) + +// SettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Setting. This struct is safe to replace or modify but +// should not be done so concurrently. +var SettingJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Setting) UnmarshalJSON(b []byte) error { + return SettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Setting)(nil) + +// IntJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Int. This struct is safe to replace or modify but +// should not be done so concurrently. +var IntJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Int) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := IntJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Int)(nil) + +// IntJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Int. This struct is safe to replace or modify but +// should not be done so concurrently. +var IntJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Int) UnmarshalJSON(b []byte) error { + return IntJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Int)(nil) + +// StringJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of String. This struct is safe to replace or modify but +// should not be done so concurrently. +var StringJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *String) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := StringJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*String)(nil) + +// StringJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of String. This struct is safe to replace or modify but +// should not be done so concurrently. +var StringJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *String) UnmarshalJSON(b []byte) error { + return StringJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*String)(nil) + +// BoolJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Bool. This struct is safe to replace or modify but +// should not be done so concurrently. +var BoolJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Bool) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := BoolJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Bool)(nil) + +// BoolJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Bool. This struct is safe to replace or modify but +// should not be done so concurrently. +var BoolJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Bool) UnmarshalJSON(b []byte) error { + return BoolJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Bool)(nil) + +// SingleChoiceListJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of SingleChoiceList. This struct is safe to replace or modify but +// should not be done so concurrently. +var SingleChoiceListJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *SingleChoiceList) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SingleChoiceListJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*SingleChoiceList)(nil) + +// SingleChoiceListJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of SingleChoiceList. This struct is safe to replace or modify but +// should not be done so concurrently. +var SingleChoiceListJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *SingleChoiceList) UnmarshalJSON(b []byte) error { + return SingleChoiceListJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*SingleChoiceList)(nil) + +// MultiChoiceListJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of MultiChoiceList. This struct is safe to replace or modify but +// should not be done so concurrently. +var MultiChoiceListJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *MultiChoiceList) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := MultiChoiceListJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*MultiChoiceList)(nil) + +// MultiChoiceListJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of MultiChoiceList. This struct is safe to replace or modify but +// should not be done so concurrently. +var MultiChoiceListJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *MultiChoiceList) UnmarshalJSON(b []byte) error { + return MultiChoiceListJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*MultiChoiceList)(nil) + +// ListOptionJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListOption. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListOptionJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListOption) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListOptionJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListOption)(nil) + +// ListOptionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListOption. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListOptionJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListOption) UnmarshalJSON(b []byte) error { + return ListOptionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListOption)(nil) + +// PermissionJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Permission. This struct is safe to replace or modify but +// should not be done so concurrently. +var PermissionJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Permission) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := PermissionJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Permission)(nil) + +// PermissionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Permission. This struct is safe to replace or modify but +// should not be done so concurrently. +var PermissionJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Permission) UnmarshalJSON(b []byte) error { + return PermissionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Permission)(nil) + +// ValueJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of Value. This struct is safe to replace or modify but +// should not be done so concurrently. +var ValueJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *Value) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ValueJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*Value)(nil) + +// ValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of Value. This struct is safe to replace or modify but +// should not be done so concurrently. +var ValueJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *Value) UnmarshalJSON(b []byte) error { + return ValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*Value)(nil) + +// ListValueJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListValue. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValueJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListValue) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListValueJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListValue)(nil) + +// ListValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListValue. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValueJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListValue) UnmarshalJSON(b []byte) error { + return ListValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListValue)(nil) + +// ListOptionValueJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListOptionValue. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListOptionValueJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListOptionValue) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListOptionValueJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListOptionValue)(nil) + +// ListOptionValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListOptionValue. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListOptionValueJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListOptionValue) UnmarshalJSON(b []byte) error { + return ListOptionValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListOptionValue)(nil) diff --git a/protogen/gen/ocis/messages/settings/v1/settings.swagger.json b/protogen/gen/ocis/messages/settings/v1/settings.swagger.json new file mode 100644 index 00000000000..8d47f2e103f --- /dev/null +++ b/protogen/gen/ocis/messages/settings/v1/settings.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "ocis/messages/settings/v1/settings.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.go b/protogen/gen/ocis/services/settings/v1/settings.pb.go new file mode 100644 index 00000000000..712745fa5ca --- /dev/null +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.go @@ -0,0 +1,2004 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/services/settings/v1/settings.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + 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) +) + +// --- +// requests and responses for settings bundles +// --- +type SaveBundleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` +} + +func (x *SaveBundleRequest) Reset() { + *x = SaveBundleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveBundleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveBundleRequest) ProtoMessage() {} + +func (x *SaveBundleRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 SaveBundleRequest.ProtoReflect.Descriptor instead. +func (*SaveBundleRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{0} +} + +func (x *SaveBundleRequest) GetBundle() *v1.Bundle { + if x != nil { + return x.Bundle + } + return nil +} + +type SaveBundleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` +} + +func (x *SaveBundleResponse) Reset() { + *x = SaveBundleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveBundleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveBundleResponse) ProtoMessage() {} + +func (x *SaveBundleResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 SaveBundleResponse.ProtoReflect.Descriptor instead. +func (*SaveBundleResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{1} +} + +func (x *SaveBundleResponse) GetBundle() *v1.Bundle { + if x != nil { + return x.Bundle + } + return nil +} + +type GetBundleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` +} + +func (x *GetBundleRequest) Reset() { + *x = GetBundleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBundleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBundleRequest) ProtoMessage() {} + +func (x *GetBundleRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 GetBundleRequest.ProtoReflect.Descriptor instead. +func (*GetBundleRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{2} +} + +func (x *GetBundleRequest) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +type GetBundleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` +} + +func (x *GetBundleResponse) Reset() { + *x = GetBundleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBundleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBundleResponse) ProtoMessage() {} + +func (x *GetBundleResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 GetBundleResponse.ProtoReflect.Descriptor instead. +func (*GetBundleResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{3} +} + +func (x *GetBundleResponse) GetBundle() *v1.Bundle { + if x != nil { + return x.Bundle + } + return nil +} + +type ListBundlesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BundleIds []string `protobuf:"bytes,1,rep,name=bundle_ids,json=bundleIds,proto3" json:"bundle_ids,omitempty"` +} + +func (x *ListBundlesRequest) Reset() { + *x = ListBundlesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBundlesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBundlesRequest) ProtoMessage() {} + +func (x *ListBundlesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 ListBundlesRequest.ProtoReflect.Descriptor instead. +func (*ListBundlesRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{4} +} + +func (x *ListBundlesRequest) GetBundleIds() []string { + if x != nil { + return x.BundleIds + } + return nil +} + +type ListBundlesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bundles []*v1.Bundle `protobuf:"bytes,1,rep,name=bundles,proto3" json:"bundles,omitempty"` +} + +func (x *ListBundlesResponse) Reset() { + *x = ListBundlesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBundlesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBundlesResponse) ProtoMessage() {} + +func (x *ListBundlesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 ListBundlesResponse.ProtoReflect.Descriptor instead. +func (*ListBundlesResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{5} +} + +func (x *ListBundlesResponse) GetBundles() []*v1.Bundle { + if x != nil { + return x.Bundles + } + return nil +} + +type AddSettingToBundleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` + Setting *v1.Setting `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"` +} + +func (x *AddSettingToBundleRequest) Reset() { + *x = AddSettingToBundleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSettingToBundleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSettingToBundleRequest) ProtoMessage() {} + +func (x *AddSettingToBundleRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 AddSettingToBundleRequest.ProtoReflect.Descriptor instead. +func (*AddSettingToBundleRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{6} +} + +func (x *AddSettingToBundleRequest) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +func (x *AddSettingToBundleRequest) GetSetting() *v1.Setting { + if x != nil { + return x.Setting + } + return nil +} + +type AddSettingToBundleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Setting *v1.Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"` +} + +func (x *AddSettingToBundleResponse) Reset() { + *x = AddSettingToBundleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddSettingToBundleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSettingToBundleResponse) ProtoMessage() {} + +func (x *AddSettingToBundleResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 AddSettingToBundleResponse.ProtoReflect.Descriptor instead. +func (*AddSettingToBundleResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{7} +} + +func (x *AddSettingToBundleResponse) GetSetting() *v1.Setting { + if x != nil { + return x.Setting + } + return nil +} + +type RemoveSettingFromBundleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` + SettingId string `protobuf:"bytes,2,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` +} + +func (x *RemoveSettingFromBundleRequest) Reset() { + *x = RemoveSettingFromBundleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveSettingFromBundleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveSettingFromBundleRequest) ProtoMessage() {} + +func (x *RemoveSettingFromBundleRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 RemoveSettingFromBundleRequest.ProtoReflect.Descriptor instead. +func (*RemoveSettingFromBundleRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{8} +} + +func (x *RemoveSettingFromBundleRequest) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +func (x *RemoveSettingFromBundleRequest) GetSettingId() string { + if x != nil { + return x.SettingId + } + return "" +} + +type SaveValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *v1.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *SaveValueRequest) Reset() { + *x = SaveValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveValueRequest) ProtoMessage() {} + +func (x *SaveValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 SaveValueRequest.ProtoReflect.Descriptor instead. +func (*SaveValueRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{9} +} + +func (x *SaveValueRequest) GetValue() *v1.Value { + if x != nil { + return x.Value + } + return nil +} + +type SaveValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *v1.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *SaveValueResponse) Reset() { + *x = SaveValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SaveValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaveValueResponse) ProtoMessage() {} + +func (x *SaveValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 SaveValueResponse.ProtoReflect.Descriptor instead. +func (*SaveValueResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{10} +} + +func (x *SaveValueResponse) GetValue() *v1.ValueWithIdentifier { + if x != nil { + return x.Value + } + return nil +} + +type GetValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetValueRequest) Reset() { + *x = GetValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValueRequest) ProtoMessage() {} + +func (x *GetValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 GetValueRequest.ProtoReflect.Descriptor instead. +func (*GetValueRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{11} +} + +func (x *GetValueRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value *v1.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GetValueResponse) Reset() { + *x = GetValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValueResponse) ProtoMessage() {} + +func (x *GetValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 GetValueResponse.ProtoReflect.Descriptor instead. +func (*GetValueResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{12} +} + +func (x *GetValueResponse) GetValue() *v1.ValueWithIdentifier { + if x != nil { + return x.Value + } + return nil +} + +type ListValuesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` + AccountUuid string `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` +} + +func (x *ListValuesRequest) Reset() { + *x = ListValuesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListValuesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListValuesRequest) ProtoMessage() {} + +func (x *ListValuesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_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 ListValuesRequest.ProtoReflect.Descriptor instead. +func (*ListValuesRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{13} +} + +func (x *ListValuesRequest) GetBundleId() string { + if x != nil { + return x.BundleId + } + return "" +} + +func (x *ListValuesRequest) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +type ListValuesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []*v1.ValueWithIdentifier `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ListValuesResponse) Reset() { + *x = ListValuesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListValuesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListValuesResponse) ProtoMessage() {} + +func (x *ListValuesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[14] + 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 ListValuesResponse.ProtoReflect.Descriptor instead. +func (*ListValuesResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{14} +} + +func (x *ListValuesResponse) GetValues() []*v1.ValueWithIdentifier { + if x != nil { + return x.Values + } + return nil +} + +type GetValueByUniqueIdentifiersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` + SettingId string `protobuf:"bytes,2,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` +} + +func (x *GetValueByUniqueIdentifiersRequest) Reset() { + *x = GetValueByUniqueIdentifiersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValueByUniqueIdentifiersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValueByUniqueIdentifiersRequest) ProtoMessage() {} + +func (x *GetValueByUniqueIdentifiersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[15] + 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 GetValueByUniqueIdentifiersRequest.ProtoReflect.Descriptor instead. +func (*GetValueByUniqueIdentifiersRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{15} +} + +func (x *GetValueByUniqueIdentifiersRequest) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +func (x *GetValueByUniqueIdentifiersRequest) GetSettingId() string { + if x != nil { + return x.SettingId + } + return "" +} + +type ListRoleAssignmentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` +} + +func (x *ListRoleAssignmentsRequest) Reset() { + *x = ListRoleAssignmentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoleAssignmentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoleAssignmentsRequest) ProtoMessage() {} + +func (x *ListRoleAssignmentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[16] + 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 ListRoleAssignmentsRequest.ProtoReflect.Descriptor instead. +func (*ListRoleAssignmentsRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{16} +} + +func (x *ListRoleAssignmentsRequest) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +type ListRoleAssignmentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assignments []*v1.UserRoleAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` +} + +func (x *ListRoleAssignmentsResponse) Reset() { + *x = ListRoleAssignmentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRoleAssignmentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRoleAssignmentsResponse) ProtoMessage() {} + +func (x *ListRoleAssignmentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[17] + 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 ListRoleAssignmentsResponse.ProtoReflect.Descriptor instead. +func (*ListRoleAssignmentsResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{17} +} + +func (x *ListRoleAssignmentsResponse) GetAssignments() []*v1.UserRoleAssignment { + if x != nil { + return x.Assignments + } + return nil +} + +type AssignRoleToUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` + // the role_id is a bundle_id internally + RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` +} + +func (x *AssignRoleToUserRequest) Reset() { + *x = AssignRoleToUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignRoleToUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignRoleToUserRequest) ProtoMessage() {} + +func (x *AssignRoleToUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[18] + 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 AssignRoleToUserRequest.ProtoReflect.Descriptor instead. +func (*AssignRoleToUserRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{18} +} + +func (x *AssignRoleToUserRequest) GetAccountUuid() string { + if x != nil { + return x.AccountUuid + } + return "" +} + +func (x *AssignRoleToUserRequest) GetRoleId() string { + if x != nil { + return x.RoleId + } + return "" +} + +type AssignRoleToUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assignment *v1.UserRoleAssignment `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"` +} + +func (x *AssignRoleToUserResponse) Reset() { + *x = AssignRoleToUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignRoleToUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignRoleToUserResponse) ProtoMessage() {} + +func (x *AssignRoleToUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[19] + 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 AssignRoleToUserResponse.ProtoReflect.Descriptor instead. +func (*AssignRoleToUserResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{19} +} + +func (x *AssignRoleToUserResponse) GetAssignment() *v1.UserRoleAssignment { + if x != nil { + return x.Assignment + } + return nil +} + +type RemoveRoleFromUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *RemoveRoleFromUserRequest) Reset() { + *x = RemoveRoleFromUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveRoleFromUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveRoleFromUserRequest) ProtoMessage() {} + +func (x *RemoveRoleFromUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[20] + 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 RemoveRoleFromUserRequest.ProtoReflect.Descriptor instead. +func (*RemoveRoleFromUserRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{20} +} + +func (x *RemoveRoleFromUserRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListPermissionsByResourceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` +} + +func (x *ListPermissionsByResourceRequest) Reset() { + *x = ListPermissionsByResourceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPermissionsByResourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPermissionsByResourceRequest) ProtoMessage() {} + +func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[21] + 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 ListPermissionsByResourceRequest.ProtoReflect.Descriptor instead. +func (*ListPermissionsByResourceRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{21} +} + +func (x *ListPermissionsByResourceRequest) GetResource() *v1.Resource { + if x != nil { + return x.Resource + } + return nil +} + +type ListPermissionsByResourceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Permissions []*v1.Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` +} + +func (x *ListPermissionsByResourceResponse) Reset() { + *x = ListPermissionsByResourceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPermissionsByResourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPermissionsByResourceResponse) ProtoMessage() {} + +func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[22] + 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 ListPermissionsByResourceResponse.ProtoReflect.Descriptor instead. +func (*ListPermissionsByResourceResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{22} +} + +func (x *ListPermissionsByResourceResponse) GetPermissions() []*v1.Permission { + if x != nil { + return x.Permissions + } + return nil +} + +type GetPermissionByIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PermissionId string `protobuf:"bytes,1,opt,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"` +} + +func (x *GetPermissionByIDRequest) Reset() { + *x = GetPermissionByIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPermissionByIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPermissionByIDRequest) ProtoMessage() {} + +func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[23] + 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 GetPermissionByIDRequest.ProtoReflect.Descriptor instead. +func (*GetPermissionByIDRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{23} +} + +func (x *GetPermissionByIDRequest) GetPermissionId() string { + if x != nil { + return x.PermissionId + } + return "" +} + +type GetPermissionByIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Permission *v1.Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` +} + +func (x *GetPermissionByIDResponse) Reset() { + *x = GetPermissionByIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPermissionByIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPermissionByIDResponse) ProtoMessage() {} + +func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[24] + 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 GetPermissionByIDResponse.ProtoReflect.Descriptor instead. +func (*GetPermissionByIDResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{24} +} + +func (x *GetPermissionByIDResponse) GetPermission() *v1.Permission { + if x != nil { + return x.Permission + } + return nil +} + +var File_ocis_services_settings_v1_settings_proto protoreflect.FileDescriptor + +var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 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, 0x22, 0x4e, 0x0a, 0x11, 0x53, 0x61, + 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x4f, 0x0a, 0x12, 0x53, 0x61, + 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x33, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, + 0x73, 0x22, 0x52, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, + 0x3c, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5a, 0x0a, + 0x1a, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0x0a, 0x1e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x11, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x58, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, + 0x22, 0x5c, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x66, + 0x0a, 0x22, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, + 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x6e, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x17, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x69, + 0x0a, 0x18, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x19, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x63, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x21, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, + 0x06, 0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, + 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, + 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, + 0x64, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, + 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, + 0xb2, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, + 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, + 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, + 0x12, 0x39, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, + 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, + 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, + 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x32, 0x97, 0x05, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, + 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, + 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, + 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, + 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, + 0x2a, 0x32, 0x9a, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd0, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, + 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, + 0x12, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe5, + 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, + 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x76, 0x31, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, + 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, + 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, + 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, + 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, + 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, + 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3d, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, + 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x29, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, + 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_services_settings_v1_settings_proto_rawDescOnce sync.Once + file_ocis_services_settings_v1_settings_proto_rawDescData = file_ocis_services_settings_v1_settings_proto_rawDesc +) + +func file_ocis_services_settings_v1_settings_proto_rawDescGZIP() []byte { + file_ocis_services_settings_v1_settings_proto_rawDescOnce.Do(func() { + file_ocis_services_settings_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_settings_v1_settings_proto_rawDescData) + }) + return file_ocis_services_settings_v1_settings_proto_rawDescData +} + +var file_ocis_services_settings_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_ocis_services_settings_v1_settings_proto_goTypes = []interface{}{ + (*SaveBundleRequest)(nil), // 0: ocis.services.settings.v1.SaveBundleRequest + (*SaveBundleResponse)(nil), // 1: ocis.services.settings.v1.SaveBundleResponse + (*GetBundleRequest)(nil), // 2: ocis.services.settings.v1.GetBundleRequest + (*GetBundleResponse)(nil), // 3: ocis.services.settings.v1.GetBundleResponse + (*ListBundlesRequest)(nil), // 4: ocis.services.settings.v1.ListBundlesRequest + (*ListBundlesResponse)(nil), // 5: ocis.services.settings.v1.ListBundlesResponse + (*AddSettingToBundleRequest)(nil), // 6: ocis.services.settings.v1.AddSettingToBundleRequest + (*AddSettingToBundleResponse)(nil), // 7: ocis.services.settings.v1.AddSettingToBundleResponse + (*RemoveSettingFromBundleRequest)(nil), // 8: ocis.services.settings.v1.RemoveSettingFromBundleRequest + (*SaveValueRequest)(nil), // 9: ocis.services.settings.v1.SaveValueRequest + (*SaveValueResponse)(nil), // 10: ocis.services.settings.v1.SaveValueResponse + (*GetValueRequest)(nil), // 11: ocis.services.settings.v1.GetValueRequest + (*GetValueResponse)(nil), // 12: ocis.services.settings.v1.GetValueResponse + (*ListValuesRequest)(nil), // 13: ocis.services.settings.v1.ListValuesRequest + (*ListValuesResponse)(nil), // 14: ocis.services.settings.v1.ListValuesResponse + (*GetValueByUniqueIdentifiersRequest)(nil), // 15: ocis.services.settings.v1.GetValueByUniqueIdentifiersRequest + (*ListRoleAssignmentsRequest)(nil), // 16: ocis.services.settings.v1.ListRoleAssignmentsRequest + (*ListRoleAssignmentsResponse)(nil), // 17: ocis.services.settings.v1.ListRoleAssignmentsResponse + (*AssignRoleToUserRequest)(nil), // 18: ocis.services.settings.v1.AssignRoleToUserRequest + (*AssignRoleToUserResponse)(nil), // 19: ocis.services.settings.v1.AssignRoleToUserResponse + (*RemoveRoleFromUserRequest)(nil), // 20: ocis.services.settings.v1.RemoveRoleFromUserRequest + (*ListPermissionsByResourceRequest)(nil), // 21: ocis.services.settings.v1.ListPermissionsByResourceRequest + (*ListPermissionsByResourceResponse)(nil), // 22: ocis.services.settings.v1.ListPermissionsByResourceResponse + (*GetPermissionByIDRequest)(nil), // 23: ocis.services.settings.v1.GetPermissionByIDRequest + (*GetPermissionByIDResponse)(nil), // 24: ocis.services.settings.v1.GetPermissionByIDResponse + (*v1.Bundle)(nil), // 25: ocis.messages.settings.v1.Bundle + (*v1.Setting)(nil), // 26: ocis.messages.settings.v1.Setting + (*v1.Value)(nil), // 27: ocis.messages.settings.v1.Value + (*v1.ValueWithIdentifier)(nil), // 28: ocis.messages.settings.v1.ValueWithIdentifier + (*v1.UserRoleAssignment)(nil), // 29: ocis.messages.settings.v1.UserRoleAssignment + (*v1.Resource)(nil), // 30: ocis.messages.settings.v1.Resource + (*v1.Permission)(nil), // 31: ocis.messages.settings.v1.Permission + (*emptypb.Empty)(nil), // 32: google.protobuf.Empty +} +var file_ocis_services_settings_v1_settings_proto_depIdxs = []int32{ + 25, // 0: ocis.services.settings.v1.SaveBundleRequest.bundle:type_name -> ocis.messages.settings.v1.Bundle + 25, // 1: ocis.services.settings.v1.SaveBundleResponse.bundle:type_name -> ocis.messages.settings.v1.Bundle + 25, // 2: ocis.services.settings.v1.GetBundleResponse.bundle:type_name -> ocis.messages.settings.v1.Bundle + 25, // 3: ocis.services.settings.v1.ListBundlesResponse.bundles:type_name -> ocis.messages.settings.v1.Bundle + 26, // 4: ocis.services.settings.v1.AddSettingToBundleRequest.setting:type_name -> ocis.messages.settings.v1.Setting + 26, // 5: ocis.services.settings.v1.AddSettingToBundleResponse.setting:type_name -> ocis.messages.settings.v1.Setting + 27, // 6: ocis.services.settings.v1.SaveValueRequest.value:type_name -> ocis.messages.settings.v1.Value + 28, // 7: ocis.services.settings.v1.SaveValueResponse.value:type_name -> ocis.messages.settings.v1.ValueWithIdentifier + 28, // 8: ocis.services.settings.v1.GetValueResponse.value:type_name -> ocis.messages.settings.v1.ValueWithIdentifier + 28, // 9: ocis.services.settings.v1.ListValuesResponse.values:type_name -> ocis.messages.settings.v1.ValueWithIdentifier + 29, // 10: ocis.services.settings.v1.ListRoleAssignmentsResponse.assignments:type_name -> ocis.messages.settings.v1.UserRoleAssignment + 29, // 11: ocis.services.settings.v1.AssignRoleToUserResponse.assignment:type_name -> ocis.messages.settings.v1.UserRoleAssignment + 30, // 12: ocis.services.settings.v1.ListPermissionsByResourceRequest.resource:type_name -> ocis.messages.settings.v1.Resource + 31, // 13: ocis.services.settings.v1.ListPermissionsByResourceResponse.permissions:type_name -> ocis.messages.settings.v1.Permission + 31, // 14: ocis.services.settings.v1.GetPermissionByIDResponse.permission:type_name -> ocis.messages.settings.v1.Permission + 0, // 15: ocis.services.settings.v1.BundleService.SaveBundle:input_type -> ocis.services.settings.v1.SaveBundleRequest + 2, // 16: ocis.services.settings.v1.BundleService.GetBundle:input_type -> ocis.services.settings.v1.GetBundleRequest + 4, // 17: ocis.services.settings.v1.BundleService.ListBundles:input_type -> ocis.services.settings.v1.ListBundlesRequest + 6, // 18: ocis.services.settings.v1.BundleService.AddSettingToBundle:input_type -> ocis.services.settings.v1.AddSettingToBundleRequest + 8, // 19: ocis.services.settings.v1.BundleService.RemoveSettingFromBundle:input_type -> ocis.services.settings.v1.RemoveSettingFromBundleRequest + 9, // 20: ocis.services.settings.v1.ValueService.SaveValue:input_type -> ocis.services.settings.v1.SaveValueRequest + 11, // 21: ocis.services.settings.v1.ValueService.GetValue:input_type -> ocis.services.settings.v1.GetValueRequest + 13, // 22: ocis.services.settings.v1.ValueService.ListValues:input_type -> ocis.services.settings.v1.ListValuesRequest + 15, // 23: ocis.services.settings.v1.ValueService.GetValueByUniqueIdentifiers:input_type -> ocis.services.settings.v1.GetValueByUniqueIdentifiersRequest + 4, // 24: ocis.services.settings.v1.RoleService.ListRoles:input_type -> ocis.services.settings.v1.ListBundlesRequest + 16, // 25: ocis.services.settings.v1.RoleService.ListRoleAssignments:input_type -> ocis.services.settings.v1.ListRoleAssignmentsRequest + 18, // 26: ocis.services.settings.v1.RoleService.AssignRoleToUser:input_type -> ocis.services.settings.v1.AssignRoleToUserRequest + 20, // 27: ocis.services.settings.v1.RoleService.RemoveRoleFromUser:input_type -> ocis.services.settings.v1.RemoveRoleFromUserRequest + 21, // 28: ocis.services.settings.v1.PermissionService.ListPermissionsByResource:input_type -> ocis.services.settings.v1.ListPermissionsByResourceRequest + 23, // 29: ocis.services.settings.v1.PermissionService.GetPermissionByID:input_type -> ocis.services.settings.v1.GetPermissionByIDRequest + 1, // 30: ocis.services.settings.v1.BundleService.SaveBundle:output_type -> ocis.services.settings.v1.SaveBundleResponse + 3, // 31: ocis.services.settings.v1.BundleService.GetBundle:output_type -> ocis.services.settings.v1.GetBundleResponse + 5, // 32: ocis.services.settings.v1.BundleService.ListBundles:output_type -> ocis.services.settings.v1.ListBundlesResponse + 7, // 33: ocis.services.settings.v1.BundleService.AddSettingToBundle:output_type -> ocis.services.settings.v1.AddSettingToBundleResponse + 32, // 34: ocis.services.settings.v1.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty + 10, // 35: ocis.services.settings.v1.ValueService.SaveValue:output_type -> ocis.services.settings.v1.SaveValueResponse + 12, // 36: ocis.services.settings.v1.ValueService.GetValue:output_type -> ocis.services.settings.v1.GetValueResponse + 14, // 37: ocis.services.settings.v1.ValueService.ListValues:output_type -> ocis.services.settings.v1.ListValuesResponse + 12, // 38: ocis.services.settings.v1.ValueService.GetValueByUniqueIdentifiers:output_type -> ocis.services.settings.v1.GetValueResponse + 5, // 39: ocis.services.settings.v1.RoleService.ListRoles:output_type -> ocis.services.settings.v1.ListBundlesResponse + 17, // 40: ocis.services.settings.v1.RoleService.ListRoleAssignments:output_type -> ocis.services.settings.v1.ListRoleAssignmentsResponse + 19, // 41: ocis.services.settings.v1.RoleService.AssignRoleToUser:output_type -> ocis.services.settings.v1.AssignRoleToUserResponse + 32, // 42: ocis.services.settings.v1.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty + 22, // 43: ocis.services.settings.v1.PermissionService.ListPermissionsByResource:output_type -> ocis.services.settings.v1.ListPermissionsByResourceResponse + 24, // 44: ocis.services.settings.v1.PermissionService.GetPermissionByID:output_type -> ocis.services.settings.v1.GetPermissionByIDResponse + 30, // [30:45] is the sub-list for method output_type + 15, // [15:30] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_ocis_services_settings_v1_settings_proto_init() } +func file_ocis_services_settings_v1_settings_proto_init() { + if File_ocis_services_settings_v1_settings_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_services_settings_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveBundleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveBundleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBundleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBundleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBundlesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBundlesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSettingToBundleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddSettingToBundleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveSettingFromBundleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SaveValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListValuesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListValuesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetValueByUniqueIdentifiersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoleAssignmentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRoleAssignmentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignRoleToUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignRoleToUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveRoleFromUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPermissionsByResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPermissionsByResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPermissionByIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_settings_v1_settings_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetPermissionByIDResponse); 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_ocis_services_settings_v1_settings_proto_rawDesc, + NumEnums: 0, + NumMessages: 25, + NumExtensions: 0, + NumServices: 4, + }, + GoTypes: file_ocis_services_settings_v1_settings_proto_goTypes, + DependencyIndexes: file_ocis_services_settings_v1_settings_proto_depIdxs, + MessageInfos: file_ocis_services_settings_v1_settings_proto_msgTypes, + }.Build() + File_ocis_services_settings_v1_settings_proto = out.File + file_ocis_services_settings_v1_settings_proto_rawDesc = nil + file_ocis_services_settings_v1_settings_proto_goTypes = nil + file_ocis_services_settings_v1_settings_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go b/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go new file mode 100644 index 00000000000..300fd96a857 --- /dev/null +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go @@ -0,0 +1,669 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/services/settings/v1/settings.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + _ "google.golang.org/genproto/googleapis/api/annotations" + proto "google.golang.org/protobuf/proto" + emptypb "google.golang.org/protobuf/types/known/emptypb" + math "math" +) + +import ( + context "context" + api "go-micro.dev/v4/api" + client "go-micro.dev/v4/client" + server "go-micro.dev/v4/server" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// Reference imports to suppress errors if they are not otherwise used. +var _ api.Endpoint +var _ context.Context +var _ client.Option +var _ server.Option + +// Api Endpoints for BundleService service + +func NewBundleServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "BundleService.SaveBundle", + Path: []string{"/api/v1/settings/bundle-save"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "BundleService.GetBundle", + Path: []string{"/api/v1/settings/bundle-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "BundleService.ListBundles", + Path: []string{"/api/v1/settings/bundles-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "BundleService.AddSettingToBundle", + Path: []string{"/api/v1/settings/bundles-add-setting"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "BundleService.RemoveSettingFromBundle", + Path: []string{"/api/v1/settings/bundles-remove-setting"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for BundleService service + +type BundleService interface { + SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) + GetBundle(ctx context.Context, in *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) + ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) + AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) + RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) +} + +type bundleService struct { + c client.Client + name string +} + +func NewBundleService(name string, c client.Client) BundleService { + return &bundleService{ + c: c, + name: name, + } +} + +func (c *bundleService) SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) { + req := c.c.NewRequest(c.name, "BundleService.SaveBundle", in) + out := new(SaveBundleResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bundleService) GetBundle(ctx context.Context, in *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) { + req := c.c.NewRequest(c.name, "BundleService.GetBundle", in) + out := new(GetBundleResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bundleService) ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { + req := c.c.NewRequest(c.name, "BundleService.ListBundles", in) + out := new(ListBundlesResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bundleService) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) { + req := c.c.NewRequest(c.name, "BundleService.AddSettingToBundle", in) + out := new(AddSettingToBundleResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bundleService) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + req := c.c.NewRequest(c.name, "BundleService.RemoveSettingFromBundle", in) + out := new(emptypb.Empty) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for BundleService service + +type BundleServiceHandler interface { + SaveBundle(context.Context, *SaveBundleRequest, *SaveBundleResponse) error + GetBundle(context.Context, *GetBundleRequest, *GetBundleResponse) error + ListBundles(context.Context, *ListBundlesRequest, *ListBundlesResponse) error + AddSettingToBundle(context.Context, *AddSettingToBundleRequest, *AddSettingToBundleResponse) error + RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest, *emptypb.Empty) error +} + +func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, opts ...server.HandlerOption) error { + type bundleService interface { + SaveBundle(ctx context.Context, in *SaveBundleRequest, out *SaveBundleResponse) error + GetBundle(ctx context.Context, in *GetBundleRequest, out *GetBundleResponse) error + ListBundles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error + AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, out *AddSettingToBundleResponse) error + RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, out *emptypb.Empty) error + } + type BundleService struct { + bundleService + } + h := &bundleServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "BundleService.SaveBundle", + Path: []string{"/api/v1/settings/bundle-save"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "BundleService.GetBundle", + Path: []string{"/api/v1/settings/bundle-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "BundleService.ListBundles", + Path: []string{"/api/v1/settings/bundles-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "BundleService.AddSettingToBundle", + Path: []string{"/api/v1/settings/bundles-add-setting"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "BundleService.RemoveSettingFromBundle", + Path: []string{"/api/v1/settings/bundles-remove-setting"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&BundleService{h}, opts...)) +} + +type bundleServiceHandler struct { + BundleServiceHandler +} + +func (h *bundleServiceHandler) SaveBundle(ctx context.Context, in *SaveBundleRequest, out *SaveBundleResponse) error { + return h.BundleServiceHandler.SaveBundle(ctx, in, out) +} + +func (h *bundleServiceHandler) GetBundle(ctx context.Context, in *GetBundleRequest, out *GetBundleResponse) error { + return h.BundleServiceHandler.GetBundle(ctx, in, out) +} + +func (h *bundleServiceHandler) ListBundles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error { + return h.BundleServiceHandler.ListBundles(ctx, in, out) +} + +func (h *bundleServiceHandler) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, out *AddSettingToBundleResponse) error { + return h.BundleServiceHandler.AddSettingToBundle(ctx, in, out) +} + +func (h *bundleServiceHandler) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, out *emptypb.Empty) error { + return h.BundleServiceHandler.RemoveSettingFromBundle(ctx, in, out) +} + +// Api Endpoints for ValueService service + +func NewValueServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "ValueService.SaveValue", + Path: []string{"/api/v1/settings/values-save"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "ValueService.GetValue", + Path: []string{"/api/v1/settings/values-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "ValueService.ListValues", + Path: []string{"/api/v1/settings/values-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "ValueService.GetValueByUniqueIdentifiers", + Path: []string{"/api/v1/settings/values-get-by-unique-identifiers"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for ValueService service + +type ValueService interface { + SaveValue(ctx context.Context, in *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) + GetValue(ctx context.Context, in *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) + ListValues(ctx context.Context, in *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) + GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) +} + +type valueService struct { + c client.Client + name string +} + +func NewValueService(name string, c client.Client) ValueService { + return &valueService{ + c: c, + name: name, + } +} + +func (c *valueService) SaveValue(ctx context.Context, in *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) { + req := c.c.NewRequest(c.name, "ValueService.SaveValue", in) + out := new(SaveValueResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueService) GetValue(ctx context.Context, in *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) { + req := c.c.NewRequest(c.name, "ValueService.GetValue", in) + out := new(GetValueResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueService) ListValues(ctx context.Context, in *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) { + req := c.c.NewRequest(c.name, "ValueService.ListValues", in) + out := new(ListValuesResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *valueService) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) { + req := c.c.NewRequest(c.name, "ValueService.GetValueByUniqueIdentifiers", in) + out := new(GetValueResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for ValueService service + +type ValueServiceHandler interface { + SaveValue(context.Context, *SaveValueRequest, *SaveValueResponse) error + GetValue(context.Context, *GetValueRequest, *GetValueResponse) error + ListValues(context.Context, *ListValuesRequest, *ListValuesResponse) error + GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest, *GetValueResponse) error +} + +func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts ...server.HandlerOption) error { + type valueService interface { + SaveValue(ctx context.Context, in *SaveValueRequest, out *SaveValueResponse) error + GetValue(ctx context.Context, in *GetValueRequest, out *GetValueResponse) error + ListValues(ctx context.Context, in *ListValuesRequest, out *ListValuesResponse) error + GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, out *GetValueResponse) error + } + type ValueService struct { + valueService + } + h := &valueServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "ValueService.SaveValue", + Path: []string{"/api/v1/settings/values-save"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "ValueService.GetValue", + Path: []string{"/api/v1/settings/values-get"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "ValueService.ListValues", + Path: []string{"/api/v1/settings/values-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "ValueService.GetValueByUniqueIdentifiers", + Path: []string{"/api/v1/settings/values-get-by-unique-identifiers"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&ValueService{h}, opts...)) +} + +type valueServiceHandler struct { + ValueServiceHandler +} + +func (h *valueServiceHandler) SaveValue(ctx context.Context, in *SaveValueRequest, out *SaveValueResponse) error { + return h.ValueServiceHandler.SaveValue(ctx, in, out) +} + +func (h *valueServiceHandler) GetValue(ctx context.Context, in *GetValueRequest, out *GetValueResponse) error { + return h.ValueServiceHandler.GetValue(ctx, in, out) +} + +func (h *valueServiceHandler) ListValues(ctx context.Context, in *ListValuesRequest, out *ListValuesResponse) error { + return h.ValueServiceHandler.ListValues(ctx, in, out) +} + +func (h *valueServiceHandler) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, out *GetValueResponse) error { + return h.ValueServiceHandler.GetValueByUniqueIdentifiers(ctx, in, out) +} + +// Api Endpoints for RoleService service + +func NewRoleServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "RoleService.ListRoles", + Path: []string{"/api/v1/settings/roles-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "RoleService.ListRoleAssignments", + Path: []string{"/api/v1/settings/assignments-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "RoleService.AssignRoleToUser", + Path: []string{"/api/v1/settings/assignments-add"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "RoleService.RemoveRoleFromUser", + Path: []string{"/api/v1/settings/assignments-remove"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for RoleService service + +type RoleService interface { + ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) + ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) + AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) + RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) +} + +type roleService struct { + c client.Client + name string +} + +func NewRoleService(name string, c client.Client) RoleService { + return &roleService{ + c: c, + name: name, + } +} + +func (c *roleService) ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { + req := c.c.NewRequest(c.name, "RoleService.ListRoles", in) + out := new(ListBundlesResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleService) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) { + req := c.c.NewRequest(c.name, "RoleService.ListRoleAssignments", in) + out := new(ListRoleAssignmentsResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleService) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) { + req := c.c.NewRequest(c.name, "RoleService.AssignRoleToUser", in) + out := new(AssignRoleToUserResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roleService) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + req := c.c.NewRequest(c.name, "RoleService.RemoveRoleFromUser", in) + out := new(emptypb.Empty) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for RoleService service + +type RoleServiceHandler interface { + ListRoles(context.Context, *ListBundlesRequest, *ListBundlesResponse) error + ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest, *ListRoleAssignmentsResponse) error + AssignRoleToUser(context.Context, *AssignRoleToUserRequest, *AssignRoleToUserResponse) error + RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest, *emptypb.Empty) error +} + +func RegisterRoleServiceHandler(s server.Server, hdlr RoleServiceHandler, opts ...server.HandlerOption) error { + type roleService interface { + ListRoles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error + ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, out *ListRoleAssignmentsResponse) error + AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, out *AssignRoleToUserResponse) error + RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, out *emptypb.Empty) error + } + type RoleService struct { + roleService + } + h := &roleServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "RoleService.ListRoles", + Path: []string{"/api/v1/settings/roles-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "RoleService.ListRoleAssignments", + Path: []string{"/api/v1/settings/assignments-list"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "RoleService.AssignRoleToUser", + Path: []string{"/api/v1/settings/assignments-add"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "RoleService.RemoveRoleFromUser", + Path: []string{"/api/v1/settings/assignments-remove"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&RoleService{h}, opts...)) +} + +type roleServiceHandler struct { + RoleServiceHandler +} + +func (h *roleServiceHandler) ListRoles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error { + return h.RoleServiceHandler.ListRoles(ctx, in, out) +} + +func (h *roleServiceHandler) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, out *ListRoleAssignmentsResponse) error { + return h.RoleServiceHandler.ListRoleAssignments(ctx, in, out) +} + +func (h *roleServiceHandler) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, out *AssignRoleToUserResponse) error { + return h.RoleServiceHandler.AssignRoleToUser(ctx, in, out) +} + +func (h *roleServiceHandler) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, out *emptypb.Empty) error { + return h.RoleServiceHandler.RemoveRoleFromUser(ctx, in, out) +} + +// Api Endpoints for PermissionService service + +func NewPermissionServiceEndpoints() []*api.Endpoint { + return []*api.Endpoint{ + { + Name: "PermissionService.ListPermissionsByResource", + Path: []string{"/api/v1/settings/permissions-list-by-resource"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + { + Name: "PermissionService.GetPermissionByID", + Path: []string{"/api/v1/settings/permissions-get-by-id"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + }, + } +} + +// Client API for PermissionService service + +type PermissionService interface { + ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) + GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) +} + +type permissionService struct { + c client.Client + name string +} + +func NewPermissionService(name string, c client.Client) PermissionService { + return &permissionService{ + c: c, + name: name, + } +} + +func (c *permissionService) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) { + req := c.c.NewRequest(c.name, "PermissionService.ListPermissionsByResource", in) + out := new(ListPermissionsByResourceResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionService) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) { + req := c.c.NewRequest(c.name, "PermissionService.GetPermissionByID", in) + out := new(GetPermissionByIDResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for PermissionService service + +type PermissionServiceHandler interface { + ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest, *ListPermissionsByResourceResponse) error + GetPermissionByID(context.Context, *GetPermissionByIDRequest, *GetPermissionByIDResponse) error +} + +func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHandler, opts ...server.HandlerOption) error { + type permissionService interface { + ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error + GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, out *GetPermissionByIDResponse) error + } + type PermissionService struct { + permissionService + } + h := &permissionServiceHandler{hdlr} + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "PermissionService.ListPermissionsByResource", + Path: []string{"/api/v1/settings/permissions-list-by-resource"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + opts = append(opts, api.WithEndpoint(&api.Endpoint{ + Name: "PermissionService.GetPermissionByID", + Path: []string{"/api/v1/settings/permissions-get-by-id"}, + Method: []string{"POST"}, + Body: "*", + Handler: "rpc", + })) + return s.Handle(s.NewHandler(&PermissionService{h}, opts...)) +} + +type permissionServiceHandler struct { + PermissionServiceHandler +} + +func (h *permissionServiceHandler) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error { + return h.PermissionServiceHandler.ListPermissionsByResource(ctx, in, out) +} + +func (h *permissionServiceHandler) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, out *GetPermissionByIDResponse) error { + return h.PermissionServiceHandler.GetPermissionByID(ctx, in, out) +} diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.web.go b/protogen/gen/ocis/services/settings/v1/settings.pb.web.go new file mode 100644 index 00000000000..a2864c157e3 --- /dev/null +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.web.go @@ -0,0 +1,1329 @@ +// Code generated by protoc-gen-microweb. DO NOT EDIT. +// source: v1.proto + +package v1 + +import ( + "bytes" + "encoding/json" + "net/http" + + "github.com/go-chi/chi/v5" + "github.com/go-chi/render" + "github.com/golang/protobuf/jsonpb" + + ptypesempty "github.com/golang/protobuf/ptypes/empty" +) + +type webBundleServiceHandler struct { + r chi.Router + h BundleServiceHandler +} + +func (h *webBundleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webBundleServiceHandler) SaveBundle(w http.ResponseWriter, r *http.Request) { + req := &SaveBundleRequest{} + resp := &SaveBundleResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.SaveBundle( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webBundleServiceHandler) GetBundle(w http.ResponseWriter, r *http.Request) { + req := &GetBundleRequest{} + resp := &GetBundleResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetBundle( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webBundleServiceHandler) ListBundles(w http.ResponseWriter, r *http.Request) { + req := &ListBundlesRequest{} + resp := &ListBundlesResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListBundles( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webBundleServiceHandler) AddSettingToBundle(w http.ResponseWriter, r *http.Request) { + req := &AddSettingToBundleRequest{} + resp := &AddSettingToBundleResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.AddSettingToBundle( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webBundleServiceHandler) RemoveSettingFromBundle(w http.ResponseWriter, r *http.Request) { + req := &RemoveSettingFromBundleRequest{} + resp := &ptypesempty.Empty{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.RemoveSettingFromBundle( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusNoContent) + render.NoContent(w, r) +} + +func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webBundleServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/settings/bundle-save", handler.SaveBundle) + r.MethodFunc("POST", "/api/v1/settings/bundle-get", handler.GetBundle) + r.MethodFunc("POST", "/api/v1/settings/bundles-list", handler.ListBundles) + r.MethodFunc("POST", "/api/v1/settings/bundles-add-setting", handler.AddSettingToBundle) + r.MethodFunc("POST", "/api/v1/settings/bundles-remove-setting", handler.RemoveSettingFromBundle) +} + +type webValueServiceHandler struct { + r chi.Router + h ValueServiceHandler +} + +func (h *webValueServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webValueServiceHandler) SaveValue(w http.ResponseWriter, r *http.Request) { + req := &SaveValueRequest{} + resp := &SaveValueResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.SaveValue( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webValueServiceHandler) GetValue(w http.ResponseWriter, r *http.Request) { + req := &GetValueRequest{} + resp := &GetValueResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetValue( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webValueServiceHandler) ListValues(w http.ResponseWriter, r *http.Request) { + req := &ListValuesRequest{} + resp := &ListValuesResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListValues( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webValueServiceHandler) GetValueByUniqueIdentifiers(w http.ResponseWriter, r *http.Request) { + req := &GetValueByUniqueIdentifiersRequest{} + resp := &GetValueResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetValueByUniqueIdentifiers( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func RegisterValueServiceWeb(r chi.Router, i ValueServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webValueServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/settings/values-save", handler.SaveValue) + r.MethodFunc("POST", "/api/v1/settings/values-get", handler.GetValue) + r.MethodFunc("POST", "/api/v1/settings/values-list", handler.ListValues) + r.MethodFunc("POST", "/api/v1/settings/values-get-by-unique-identifiers", handler.GetValueByUniqueIdentifiers) +} + +type webRoleServiceHandler struct { + r chi.Router + h RoleServiceHandler +} + +func (h *webRoleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webRoleServiceHandler) ListRoles(w http.ResponseWriter, r *http.Request) { + req := &ListBundlesRequest{} + resp := &ListBundlesResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListRoles( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webRoleServiceHandler) ListRoleAssignments(w http.ResponseWriter, r *http.Request) { + req := &ListRoleAssignmentsRequest{} + resp := &ListRoleAssignmentsResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListRoleAssignments( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webRoleServiceHandler) AssignRoleToUser(w http.ResponseWriter, r *http.Request) { + req := &AssignRoleToUserRequest{} + resp := &AssignRoleToUserResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.AssignRoleToUser( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webRoleServiceHandler) RemoveRoleFromUser(w http.ResponseWriter, r *http.Request) { + req := &RemoveRoleFromUserRequest{} + resp := &ptypesempty.Empty{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.RemoveRoleFromUser( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusNoContent) + render.NoContent(w, r) +} + +func RegisterRoleServiceWeb(r chi.Router, i RoleServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webRoleServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/settings/roles-list", handler.ListRoles) + r.MethodFunc("POST", "/api/v1/settings/assignments-list", handler.ListRoleAssignments) + r.MethodFunc("POST", "/api/v1/settings/assignments-add", handler.AssignRoleToUser) + r.MethodFunc("POST", "/api/v1/settings/assignments-remove", handler.RemoveRoleFromUser) +} + +type webPermissionServiceHandler struct { + r chi.Router + h PermissionServiceHandler +} + +func (h *webPermissionServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + h.r.ServeHTTP(w, r) +} + +func (h *webPermissionServiceHandler) ListPermissionsByResource(w http.ResponseWriter, r *http.Request) { + req := &ListPermissionsByResourceRequest{} + resp := &ListPermissionsByResourceResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.ListPermissionsByResource( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func (h *webPermissionServiceHandler) GetPermissionByID(w http.ResponseWriter, r *http.Request) { + req := &GetPermissionByIDRequest{} + resp := &GetPermissionByIDResponse{} + + if err := json.NewDecoder(r.Body).Decode(&req); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if err := h.h.GetPermissionByID( + r.Context(), + req, + resp, + ); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + render.Status(r, http.StatusCreated) + render.JSON(w, r, resp) +} + +func RegisterPermissionServiceWeb(r chi.Router, i PermissionServiceHandler, middlewares ...func(http.Handler) http.Handler) { + handler := &webPermissionServiceHandler{ + r: r, + h: i, + } + + r.MethodFunc("POST", "/api/v1/settings/permissions-list-by-resource", handler.ListPermissionsByResource) + r.MethodFunc("POST", "/api/v1/settings/permissions-get-by-id", handler.GetPermissionByID) +} + +// SaveBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of SaveBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveBundleRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *SaveBundleRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SaveBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*SaveBundleRequest)(nil) + +// SaveBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of SaveBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *SaveBundleRequest) UnmarshalJSON(b []byte) error { + return SaveBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*SaveBundleRequest)(nil) + +// SaveBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of SaveBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveBundleResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *SaveBundleResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SaveBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*SaveBundleResponse)(nil) + +// SaveBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of SaveBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *SaveBundleResponse) UnmarshalJSON(b []byte) error { + return SaveBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*SaveBundleResponse)(nil) + +// GetBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetBundleRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetBundleRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetBundleRequest)(nil) + +// GetBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetBundleRequest) UnmarshalJSON(b []byte) error { + return GetBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetBundleRequest)(nil) + +// GetBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetBundleResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetBundleResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetBundleResponse)(nil) + +// GetBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetBundleResponse) UnmarshalJSON(b []byte) error { + return GetBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetBundleResponse)(nil) + +// ListBundlesRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListBundlesRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListBundlesRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListBundlesRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListBundlesRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListBundlesRequest)(nil) + +// ListBundlesRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListBundlesRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListBundlesRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListBundlesRequest) UnmarshalJSON(b []byte) error { + return ListBundlesRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListBundlesRequest)(nil) + +// ListBundlesResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListBundlesResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListBundlesResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListBundlesResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListBundlesResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListBundlesResponse)(nil) + +// ListBundlesResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListBundlesResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListBundlesResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListBundlesResponse) UnmarshalJSON(b []byte) error { + return ListBundlesResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListBundlesResponse)(nil) + +// AddSettingToBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddSettingToBundleRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *AddSettingToBundleRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AddSettingToBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*AddSettingToBundleRequest)(nil) + +// AddSettingToBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddSettingToBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *AddSettingToBundleRequest) UnmarshalJSON(b []byte) error { + return AddSettingToBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*AddSettingToBundleRequest)(nil) + +// AddSettingToBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddSettingToBundleResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *AddSettingToBundleResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AddSettingToBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*AddSettingToBundleResponse)(nil) + +// AddSettingToBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var AddSettingToBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *AddSettingToBundleResponse) UnmarshalJSON(b []byte) error { + return AddSettingToBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*AddSettingToBundleResponse)(nil) + +// RemoveSettingFromBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveSettingFromBundleRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *RemoveSettingFromBundleRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := RemoveSettingFromBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*RemoveSettingFromBundleRequest)(nil) + +// RemoveSettingFromBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveSettingFromBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *RemoveSettingFromBundleRequest) UnmarshalJSON(b []byte) error { + return RemoveSettingFromBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*RemoveSettingFromBundleRequest)(nil) + +// SaveValueRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of SaveValueRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveValueRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *SaveValueRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SaveValueRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*SaveValueRequest)(nil) + +// SaveValueRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of SaveValueRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveValueRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *SaveValueRequest) UnmarshalJSON(b []byte) error { + return SaveValueRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*SaveValueRequest)(nil) + +// SaveValueResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of SaveValueResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveValueResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *SaveValueResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := SaveValueResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*SaveValueResponse)(nil) + +// SaveValueResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of SaveValueResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var SaveValueResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *SaveValueResponse) UnmarshalJSON(b []byte) error { + return SaveValueResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*SaveValueResponse)(nil) + +// GetValueRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetValueRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetValueRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetValueRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetValueRequest)(nil) + +// GetValueRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetValueRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetValueRequest) UnmarshalJSON(b []byte) error { + return GetValueRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetValueRequest)(nil) + +// GetValueResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetValueResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetValueResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetValueResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetValueResponse)(nil) + +// GetValueResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetValueResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetValueResponse) UnmarshalJSON(b []byte) error { + return GetValueResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetValueResponse)(nil) + +// ListValuesRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListValuesRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValuesRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListValuesRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListValuesRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListValuesRequest)(nil) + +// ListValuesRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListValuesRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValuesRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListValuesRequest) UnmarshalJSON(b []byte) error { + return ListValuesRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListValuesRequest)(nil) + +// ListValuesResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListValuesResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValuesResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListValuesResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListValuesResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListValuesResponse)(nil) + +// ListValuesResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListValuesResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListValuesResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListValuesResponse) UnmarshalJSON(b []byte) error { + return ListValuesResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListValuesResponse)(nil) + +// GetValueByUniqueIdentifiersRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueByUniqueIdentifiersRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetValueByUniqueIdentifiersRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetValueByUniqueIdentifiersRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetValueByUniqueIdentifiersRequest)(nil) + +// GetValueByUniqueIdentifiersRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetValueByUniqueIdentifiersRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetValueByUniqueIdentifiersRequest) UnmarshalJSON(b []byte) error { + return GetValueByUniqueIdentifiersRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetValueByUniqueIdentifiersRequest)(nil) + +// ListRoleAssignmentsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListRoleAssignmentsRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListRoleAssignmentsRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListRoleAssignmentsRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListRoleAssignmentsRequest)(nil) + +// ListRoleAssignmentsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListRoleAssignmentsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListRoleAssignmentsRequest) UnmarshalJSON(b []byte) error { + return ListRoleAssignmentsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListRoleAssignmentsRequest)(nil) + +// ListRoleAssignmentsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListRoleAssignmentsResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListRoleAssignmentsResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListRoleAssignmentsResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListRoleAssignmentsResponse)(nil) + +// ListRoleAssignmentsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListRoleAssignmentsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListRoleAssignmentsResponse) UnmarshalJSON(b []byte) error { + return ListRoleAssignmentsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListRoleAssignmentsResponse)(nil) + +// AssignRoleToUserRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AssignRoleToUserRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *AssignRoleToUserRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AssignRoleToUserRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*AssignRoleToUserRequest)(nil) + +// AssignRoleToUserRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var AssignRoleToUserRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *AssignRoleToUserRequest) UnmarshalJSON(b []byte) error { + return AssignRoleToUserRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*AssignRoleToUserRequest)(nil) + +// AssignRoleToUserResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var AssignRoleToUserResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *AssignRoleToUserResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := AssignRoleToUserResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*AssignRoleToUserResponse)(nil) + +// AssignRoleToUserResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var AssignRoleToUserResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *AssignRoleToUserResponse) UnmarshalJSON(b []byte) error { + return AssignRoleToUserResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*AssignRoleToUserResponse)(nil) + +// RemoveRoleFromUserRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveRoleFromUserRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *RemoveRoleFromUserRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := RemoveRoleFromUserRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*RemoveRoleFromUserRequest)(nil) + +// RemoveRoleFromUserRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var RemoveRoleFromUserRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *RemoveRoleFromUserRequest) UnmarshalJSON(b []byte) error { + return RemoveRoleFromUserRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*RemoveRoleFromUserRequest)(nil) + +// ListPermissionsByResourceRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsByResourceRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListPermissionsByResourceRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListPermissionsByResourceRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListPermissionsByResourceRequest)(nil) + +// ListPermissionsByResourceRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsByResourceRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListPermissionsByResourceRequest) UnmarshalJSON(b []byte) error { + return ListPermissionsByResourceRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListPermissionsByResourceRequest)(nil) + +// ListPermissionsByResourceResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsByResourceResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *ListPermissionsByResourceResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := ListPermissionsByResourceResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*ListPermissionsByResourceResponse)(nil) + +// ListPermissionsByResourceResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var ListPermissionsByResourceResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *ListPermissionsByResourceResponse) UnmarshalJSON(b []byte) error { + return ListPermissionsByResourceResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*ListPermissionsByResourceResponse)(nil) + +// GetPermissionByIDRequestJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetPermissionByIDRequestJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetPermissionByIDRequest) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetPermissionByIDRequestJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetPermissionByIDRequest)(nil) + +// GetPermissionByIDRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetPermissionByIDRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetPermissionByIDRequest) UnmarshalJSON(b []byte) error { + return GetPermissionByIDRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetPermissionByIDRequest)(nil) + +// GetPermissionByIDResponseJSONMarshaler describes the default jsonpb.Marshaler used by all +// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetPermissionByIDResponseJSONMarshaler = new(jsonpb.Marshaler) + +// MarshalJSON satisfies the encoding/json Marshaler interface. This method +// uses the more correct jsonpb package to correctly marshal the message. +func (m *GetPermissionByIDResponse) MarshalJSON() ([]byte, error) { + if m == nil { + return json.Marshal(nil) + } + + buf := &bytes.Buffer{} + + if err := GetPermissionByIDResponseJSONMarshaler.Marshal(buf, m); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +var _ json.Marshaler = (*GetPermissionByIDResponse)(nil) + +// GetPermissionByIDResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all +// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but +// should not be done so concurrently. +var GetPermissionByIDResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) + +// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method +// uses the more correct jsonpb package to correctly unmarshal the message. +func (m *GetPermissionByIDResponse) UnmarshalJSON(b []byte) error { + return GetPermissionByIDResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) +} + +var _ json.Unmarshaler = (*GetPermissionByIDResponse)(nil) diff --git a/protogen/gen/ocis/services/settings/v1/settings.swagger.json b/protogen/gen/ocis/services/settings/v1/settings.swagger.json new file mode 100644 index 00000000000..fd146c2f286 --- /dev/null +++ b/protogen/gen/ocis/services/settings/v1/settings.swagger.json @@ -0,0 +1,1114 @@ +{ + "swagger": "2.0", + "info": { + "title": "ownCloud Infinite Scale settings", + "version": "1.0.0", + "contact": { + "name": "ownCloud GmbH", + "url": "https://github.com/owncloud/ocis", + "email": "support@owncloud.com" + }, + "license": { + "name": "Apache-2.0", + "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" + } + }, + "tags": [ + { + "name": "BundleService" + }, + { + "name": "ValueService" + }, + { + "name": "RoleService" + }, + { + "name": "PermissionService" + } + ], + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/api/v1/settings/assignments-add": { + "post": { + "operationId": "RoleService_AssignRoleToUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AssignRoleToUserResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AssignRoleToUserRequest" + } + } + ], + "tags": [ + "RoleService" + ] + } + }, + "/api/v1/settings/assignments-list": { + "post": { + "operationId": "RoleService_ListRoleAssignments", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListRoleAssignmentsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListRoleAssignmentsRequest" + } + } + ], + "tags": [ + "RoleService" + ] + } + }, + "/api/v1/settings/assignments-remove": { + "post": { + "operationId": "RoleService_RemoveRoleFromUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RemoveRoleFromUserRequest" + } + } + ], + "tags": [ + "RoleService" + ] + } + }, + "/api/v1/settings/bundle-get": { + "post": { + "operationId": "BundleService_GetBundle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetBundleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetBundleRequest" + } + } + ], + "tags": [ + "BundleService" + ] + } + }, + "/api/v1/settings/bundle-save": { + "post": { + "operationId": "BundleService_SaveBundle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SaveBundleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SaveBundleRequest" + } + } + ], + "tags": [ + "BundleService" + ] + } + }, + "/api/v1/settings/bundles-add-setting": { + "post": { + "operationId": "BundleService_AddSettingToBundle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddSettingToBundleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddSettingToBundleRequest" + } + } + ], + "tags": [ + "BundleService" + ] + } + }, + "/api/v1/settings/bundles-list": { + "post": { + "operationId": "BundleService_ListBundles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListBundlesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListBundlesRequest" + } + } + ], + "tags": [ + "BundleService" + ] + } + }, + "/api/v1/settings/bundles-remove-setting": { + "post": { + "operationId": "BundleService_RemoveSettingFromBundle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RemoveSettingFromBundleRequest" + } + } + ], + "tags": [ + "BundleService" + ] + } + }, + "/api/v1/settings/permissions-get-by-id": { + "post": { + "operationId": "PermissionService_GetPermissionByID", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetPermissionByIDResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetPermissionByIDRequest" + } + } + ], + "tags": [ + "PermissionService" + ] + } + }, + "/api/v1/settings/permissions-list-by-resource": { + "post": { + "operationId": "PermissionService_ListPermissionsByResource", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListPermissionsByResourceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListPermissionsByResourceRequest" + } + } + ], + "tags": [ + "PermissionService" + ] + } + }, + "/api/v1/settings/roles-list": { + "post": { + "operationId": "RoleService_ListRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListBundlesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListBundlesRequest" + } + } + ], + "tags": [ + "RoleService" + ] + } + }, + "/api/v1/settings/values-get": { + "post": { + "operationId": "ValueService_GetValue", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetValueResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetValueRequest" + } + } + ], + "tags": [ + "ValueService" + ] + } + }, + "/api/v1/settings/values-get-by-unique-identifiers": { + "post": { + "operationId": "ValueService_GetValueByUniqueIdentifiers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetValueResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetValueByUniqueIdentifiersRequest" + } + } + ], + "tags": [ + "ValueService" + ] + } + }, + "/api/v1/settings/values-list": { + "post": { + "operationId": "ValueService_ListValues", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListValuesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListValuesRequest" + } + } + ], + "tags": [ + "ValueService" + ] + } + }, + "/api/v1/settings/values-save": { + "post": { + "operationId": "ValueService_SaveValue", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SaveValueResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SaveValueRequest" + } + } + ], + "tags": [ + "ValueService" + ] + } + } + }, + "definitions": { + "PermissionConstraint": { + "type": "string", + "enum": [ + "CONSTRAINT_UNKNOWN", + "CONSTRAINT_OWN", + "CONSTRAINT_SHARED", + "CONSTRAINT_ALL" + ], + "default": "CONSTRAINT_UNKNOWN" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "settingsv1ListValue": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ListOptionValue" + } + } + } + }, + "settingsv1Value": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "id is the id of the Value. It is generated on saving it." + }, + "bundleId": { + "type": "string" + }, + "settingId": { + "type": "string", + "description": "setting_id is the id of the setting from within its bundle." + }, + "accountUuid": { + "type": "string" + }, + "resource": { + "$ref": "#/definitions/v1Resource" + }, + "boolValue": { + "type": "boolean" + }, + "intValue": { + "type": "string", + "format": "int64" + }, + "stringValue": { + "type": "string" + }, + "listValue": { + "$ref": "#/definitions/settingsv1ListValue" + } + } + }, + "v1AddSettingToBundleRequest": { + "type": "object", + "properties": { + "bundleId": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/v1Setting" + } + } + }, + "v1AddSettingToBundleResponse": { + "type": "object", + "properties": { + "setting": { + "$ref": "#/definitions/v1Setting" + } + } + }, + "v1AssignRoleToUserRequest": { + "type": "object", + "properties": { + "accountUuid": { + "type": "string" + }, + "roleId": { + "type": "string", + "title": "the role_id is a bundle_id internally" + } + } + }, + "v1AssignRoleToUserResponse": { + "type": "object", + "properties": { + "assignment": { + "$ref": "#/definitions/v1UserRoleAssignment" + } + } + }, + "v1Bool": { + "type": "object", + "properties": { + "default": { + "type": "boolean" + }, + "label": { + "type": "string" + } + } + }, + "v1Bundle": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1BundleType" + }, + "extension": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "settings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Setting" + } + }, + "resource": { + "$ref": "#/definitions/v1Resource" + } + } + }, + "v1BundleType": { + "type": "string", + "enum": [ + "TYPE_UNKNOWN", + "TYPE_DEFAULT", + "TYPE_ROLE" + ], + "default": "TYPE_UNKNOWN" + }, + "v1GetBundleRequest": { + "type": "object", + "properties": { + "bundleId": { + "type": "string" + } + } + }, + "v1GetBundleResponse": { + "type": "object", + "properties": { + "bundle": { + "$ref": "#/definitions/v1Bundle" + } + } + }, + "v1GetPermissionByIDRequest": { + "type": "object", + "properties": { + "permissionId": { + "type": "string" + } + } + }, + "v1GetPermissionByIDResponse": { + "type": "object", + "properties": { + "permission": { + "$ref": "#/definitions/v1Permission" + } + } + }, + "v1GetValueByUniqueIdentifiersRequest": { + "type": "object", + "properties": { + "accountUuid": { + "type": "string" + }, + "settingId": { + "type": "string" + } + } + }, + "v1GetValueRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1GetValueResponse": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/v1ValueWithIdentifier" + } + } + }, + "v1Identifier": { + "type": "object", + "properties": { + "extension": { + "type": "string" + }, + "bundle": { + "type": "string" + }, + "setting": { + "type": "string" + } + } + }, + "v1Int": { + "type": "object", + "properties": { + "default": { + "type": "string", + "format": "int64" + }, + "min": { + "type": "string", + "format": "int64" + }, + "max": { + "type": "string", + "format": "int64" + }, + "step": { + "type": "string", + "format": "int64" + }, + "placeholder": { + "type": "string" + } + } + }, + "v1ListBundlesRequest": { + "type": "object", + "properties": { + "bundleIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ListBundlesResponse": { + "type": "object", + "properties": { + "bundles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Bundle" + } + } + } + }, + "v1ListOption": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/v1ListOptionValue" + }, + "default": { + "type": "boolean" + }, + "displayValue": { + "type": "string" + } + } + }, + "v1ListOptionValue": { + "type": "object", + "properties": { + "stringValue": { + "type": "string" + }, + "intValue": { + "type": "string", + "format": "int64" + } + } + }, + "v1ListPermissionsByResourceRequest": { + "type": "object", + "properties": { + "resource": { + "$ref": "#/definitions/v1Resource" + } + } + }, + "v1ListPermissionsByResourceResponse": { + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Permission" + } + } + } + }, + "v1ListRoleAssignmentsRequest": { + "type": "object", + "properties": { + "accountUuid": { + "type": "string" + } + } + }, + "v1ListRoleAssignmentsResponse": { + "type": "object", + "properties": { + "assignments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UserRoleAssignment" + } + } + } + }, + "v1ListValuesRequest": { + "type": "object", + "properties": { + "bundleId": { + "type": "string" + }, + "accountUuid": { + "type": "string" + } + } + }, + "v1ListValuesResponse": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ValueWithIdentifier" + } + } + } + }, + "v1MultiChoiceList": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ListOption" + } + } + } + }, + "v1Permission": { + "type": "object", + "properties": { + "operation": { + "$ref": "#/definitions/v1PermissionOperation" + }, + "constraint": { + "$ref": "#/definitions/PermissionConstraint" + } + } + }, + "v1PermissionOperation": { + "type": "string", + "enum": [ + "OPERATION_UNKNOWN", + "OPERATION_CREATE", + "OPERATION_READ", + "OPERATION_UPDATE", + "OPERATION_DELETE", + "OPERATION_WRITE", + "OPERATION_READWRITE" + ], + "default": "OPERATION_UNKNOWN" + }, + "v1RemoveRoleFromUserRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "v1RemoveSettingFromBundleRequest": { + "type": "object", + "properties": { + "bundleId": { + "type": "string" + }, + "settingId": { + "type": "string" + } + } + }, + "v1Resource": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/v1ResourceType" + }, + "id": { + "type": "string" + } + } + }, + "v1ResourceType": { + "type": "string", + "enum": [ + "TYPE_UNKNOWN", + "TYPE_SYSTEM", + "TYPE_FILE", + "TYPE_SHARE", + "TYPE_SETTING", + "TYPE_BUNDLE", + "TYPE_USER", + "TYPE_GROUP" + ], + "default": "TYPE_UNKNOWN" + }, + "v1SaveBundleRequest": { + "type": "object", + "properties": { + "bundle": { + "$ref": "#/definitions/v1Bundle" + } + }, + "title": "---\nrequests and responses for settings bundles\n---" + }, + "v1SaveBundleResponse": { + "type": "object", + "properties": { + "bundle": { + "$ref": "#/definitions/v1Bundle" + } + } + }, + "v1SaveValueRequest": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/settingsv1Value" + } + } + }, + "v1SaveValueResponse": { + "type": "object", + "properties": { + "value": { + "$ref": "#/definitions/v1ValueWithIdentifier" + } + } + }, + "v1Setting": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "description": { + "type": "string" + }, + "intValue": { + "$ref": "#/definitions/v1Int" + }, + "stringValue": { + "$ref": "#/definitions/v1String" + }, + "boolValue": { + "$ref": "#/definitions/v1Bool" + }, + "singleChoiceValue": { + "$ref": "#/definitions/v1SingleChoiceList" + }, + "multiChoiceValue": { + "$ref": "#/definitions/v1MultiChoiceList" + }, + "permissionValue": { + "$ref": "#/definitions/v1Permission" + }, + "resource": { + "$ref": "#/definitions/v1Resource" + } + } + }, + "v1SingleChoiceList": { + "type": "object", + "properties": { + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ListOption" + } + } + } + }, + "v1String": { + "type": "object", + "properties": { + "default": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "minLength": { + "type": "integer", + "format": "int32" + }, + "maxLength": { + "type": "integer", + "format": "int32" + }, + "placeholder": { + "type": "string" + } + } + }, + "v1UserRoleAssignment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "id is generated upon saving the assignment" + }, + "accountUuid": { + "type": "string" + }, + "roleId": { + "type": "string", + "title": "the role_id is a bundle_id internally" + } + } + }, + "v1ValueWithIdentifier": { + "type": "object", + "properties": { + "identifier": { + "$ref": "#/definitions/v1Identifier" + }, + "value": { + "$ref": "#/definitions/settingsv1Value" + } + } + } + }, + "externalDocs": { + "description": "Developer Manual", + "url": "https://owncloud.dev/extensions/settings/" + } +} diff --git a/protogen/proto/ocis/messages/settings/v1/settings.proto b/protogen/proto/ocis/messages/settings/v1/settings.proto new file mode 100644 index 00000000000..889b51cd3a2 --- /dev/null +++ b/protogen/proto/ocis/messages/settings/v1/settings.proto @@ -0,0 +1,172 @@ +syntax = "proto3"; + +package ocis.messages.settings.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1"; + +// --- +// messages for settings values +// --- + +message ValueWithIdentifier { + Identifier identifier = 1; + Value value = 2; +} + +message Identifier { + string extension = 1; + string bundle = 2; + string setting = 3; +} + +// --- +// messages for role assignment +// --- + +message UserRoleAssignment { + // id is generated upon saving the assignment + string id = 1; + string account_uuid = 2; + // the role_id is a bundle_id internally + string role_id = 3; +} + +// --- +// resource payloads +// --- + +message Resource { + enum Type { + TYPE_UNKNOWN = 0; + TYPE_SYSTEM = 1; + TYPE_FILE = 2; + TYPE_SHARE = 3; + TYPE_SETTING = 4; + TYPE_BUNDLE = 5; + TYPE_USER = 6; + TYPE_GROUP = 7; + } + Type type = 1; + string id = 2; +} + +// --- +// payloads for bundles +// --- + +message Bundle { + enum Type { + TYPE_UNKNOWN = 0; + TYPE_DEFAULT = 1; + TYPE_ROLE = 2; + } + string id = 1; + string name = 2; + Type type = 3; + string extension = 4; + string display_name = 5; + repeated Setting settings = 6; + Resource resource = 7; +} + +message Setting { + string id = 1; + string name = 2; + string display_name = 3; + string description = 4; + oneof value { + Int int_value = 5; + String string_value = 6; + Bool bool_value = 7; + SingleChoiceList single_choice_value = 8; + MultiChoiceList multi_choice_value = 9; + Permission permission_value = 10; + } + Resource resource = 11; +} + +message Int { + int64 default = 1; + int64 min = 2; + int64 max = 3; + int64 step = 4; + string placeholder = 5; +} + +message String { + string default = 1; + bool required = 2; + int32 min_length = 3; + int32 max_length = 4; + string placeholder = 5; +} + +message Bool { + bool default = 1; + string label = 2; +} + +message SingleChoiceList { + repeated ListOption options = 1; +} + +message MultiChoiceList { + repeated ListOption options = 1; +} + +message ListOption { + ListOptionValue value = 1; + bool default = 2; + string display_value = 3; +} + +message Permission { + enum Operation { + OPERATION_UNKNOWN = 0; + OPERATION_CREATE = 1; + OPERATION_READ = 2; + OPERATION_UPDATE = 3; + OPERATION_DELETE = 4; + OPERATION_WRITE = 5;// WRITE is a combination of CREATE and UPDATE + OPERATION_READWRITE = 6;// READWRITE is a combination of READ and WRITE + } + Operation operation = 1; + enum Constraint { + CONSTRAINT_UNKNOWN = 0; + CONSTRAINT_OWN = 1; + CONSTRAINT_SHARED = 2; + CONSTRAINT_ALL = 3; + } + Constraint constraint = 2; +} + +// --- +// payloads for values +// --- + +message Value { + // id is the id of the Value. It is generated on saving it. + string id = 1; + string bundle_id = 2; + // setting_id is the id of the setting from within its bundle. + string setting_id = 3; + string account_uuid = 4; + Resource resource = 5; + oneof value { + bool bool_value = 6; + int64 int_value = 7; + string string_value = 8; + ListValue list_value = 9; + } +} + +message ListValue { + repeated ListOptionValue values = 1; +} + +message ListOptionValue { + oneof option { + string string_value = 1; + int64 int_value = 2; + } +} diff --git a/protogen/proto/ocis/services/settings/v1/settings.proto b/protogen/proto/ocis/services/settings/v1/settings.proto new file mode 100644 index 00000000000..d6d32ce9d9e --- /dev/null +++ b/protogen/proto/ocis/services/settings/v1/settings.proto @@ -0,0 +1,257 @@ +syntax = "proto3"; + +package ocis.services.settings.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1"; + +import "ocis/messages/settings/v1/settings.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/empty.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "ownCloud Infinite Scale settings"; + version: "1.0.0"; + contact: { + name: "ownCloud GmbH"; + url: "https://github.com/owncloud/ocis"; + email: "support@owncloud.com"; + }; + license: { + name: "Apache-2.0"; + url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; + }; + }; + schemes: HTTP; + schemes: HTTPS; + consumes: "application/json"; + produces: "application/json"; + external_docs: { + description: "Developer Manual"; + url: "https://owncloud.dev/extensions/settings/"; + }; +}; + +service BundleService { + rpc SaveBundle(SaveBundleRequest) returns (SaveBundleResponse) { + option (google.api.http) = { + post: "/api/v1/settings/bundle-save", + body: "*" + }; + } + rpc GetBundle(GetBundleRequest) returns (GetBundleResponse) { + option (google.api.http) = { + post: "/api/v1/settings/bundle-get", + body: "*" + }; + } + rpc ListBundles(ListBundlesRequest) returns (ListBundlesResponse) { + option (google.api.http) = { + post: "/api/v1/settings/bundles-list", + body: "*" + }; + } + rpc AddSettingToBundle(AddSettingToBundleRequest) returns (AddSettingToBundleResponse) { + option (google.api.http) = { + post: "/api/v1/settings/bundles-add-setting", + body: "*" + }; + } + rpc RemoveSettingFromBundle(RemoveSettingFromBundleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/api/v1/settings/bundles-remove-setting", + body: "*" + }; + } +} + +service ValueService { + rpc SaveValue(SaveValueRequest) returns (SaveValueResponse) { + option (google.api.http) = { + post: "/api/v1/settings/values-save", + body: "*" + }; + } + rpc GetValue(GetValueRequest) returns (GetValueResponse) { + option (google.api.http) = { + post: "/api/v1/settings/values-get", + body: "*" + }; + } + rpc ListValues(ListValuesRequest) returns (ListValuesResponse) { + option (google.api.http) = { + post: "/api/v1/settings/values-list", + body: "*" + }; + } + rpc GetValueByUniqueIdentifiers(GetValueByUniqueIdentifiersRequest) returns (GetValueResponse) { + option (google.api.http) = { + post: "/api/v1/settings/values-get-by-unique-identifiers", + body: "*" + }; + } +} + +service RoleService { + rpc ListRoles(ListBundlesRequest) returns (ListBundlesResponse) { + option (google.api.http) = { + post: "/api/v1/settings/roles-list", + body: "*" + }; + } + rpc ListRoleAssignments(ListRoleAssignmentsRequest) returns (ListRoleAssignmentsResponse) { + option (google.api.http) = { + post: "/api/v1/settings/assignments-list", + body: "*" + }; + } + rpc AssignRoleToUser(AssignRoleToUserRequest) returns (AssignRoleToUserResponse) { + option (google.api.http) = { + post: "/api/v1/settings/assignments-add", + body: "*" + }; + } + rpc RemoveRoleFromUser(RemoveRoleFromUserRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/api/v1/settings/assignments-remove", + body: "*" + }; + } +} + +service PermissionService { + rpc ListPermissionsByResource(ListPermissionsByResourceRequest) returns (ListPermissionsByResourceResponse) { + option (google.api.http) = { + post: "/api/v1/settings/permissions-list-by-resource", + body: "*" + }; + } + rpc GetPermissionByID(GetPermissionByIDRequest) returns (GetPermissionByIDResponse) { + option (google.api.http) = { + post: "/api/v1/settings/permissions-get-by-id", + body: "*" + }; + } +} + +// --- +// requests and responses for settings bundles +// --- +message SaveBundleRequest { + ocis.messages.settings.v1.Bundle bundle = 1; +} + +message SaveBundleResponse { + ocis.messages.settings.v1.Bundle bundle = 1; +} + +message GetBundleRequest { + string bundle_id = 1; +} + +message GetBundleResponse { + ocis.messages.settings.v1.Bundle bundle = 1; +} + +message ListBundlesRequest { + repeated string bundle_ids = 1; +} + +message ListBundlesResponse { + repeated ocis.messages.settings.v1.Bundle bundles = 1; +} + +message AddSettingToBundleRequest { + string bundle_id = 1; + ocis.messages.settings.v1.Setting setting = 2; +} + +message AddSettingToBundleResponse { + ocis.messages.settings.v1.Setting setting = 1; +} + +message RemoveSettingFromBundleRequest { + string bundle_id = 1; + string setting_id = 2; +} + +// --- +// requests and responses for settings values +// --- + +message SaveValueRequest { + ocis.messages.settings.v1.Value value = 1; +} + +message SaveValueResponse { + ocis.messages.settings.v1.ValueWithIdentifier value = 1; +} + +message GetValueRequest { + string id = 1; +} + +message GetValueResponse { + ocis.messages.settings.v1.ValueWithIdentifier value = 1; +} + +message ListValuesRequest { + string bundle_id = 1; + string account_uuid = 2; +} + +message ListValuesResponse { + repeated ocis.messages.settings.v1.ValueWithIdentifier values = 1; +} + +message GetValueByUniqueIdentifiersRequest{ + string account_uuid = 1; + string setting_id = 2; +} + +// -- +// requests and responses for role assignments +// --- + +message ListRoleAssignmentsRequest { + string account_uuid = 1; +} + +message ListRoleAssignmentsResponse { + repeated ocis.messages.settings.v1.UserRoleAssignment assignments = 1; +} + +message AssignRoleToUserRequest { + string account_uuid = 1; + // the role_id is a bundle_id internally + string role_id = 2; +} + +message AssignRoleToUserResponse { + ocis.messages.settings.v1.UserRoleAssignment assignment = 1; +} + +message RemoveRoleFromUserRequest { + string id = 1; +} + +// -- +// requests and responses for permissions +// --- + +message ListPermissionsByResourceRequest { + ocis.messages.settings.v1.Resource resource = 1; +} + +message ListPermissionsByResourceResponse { + repeated ocis.messages.settings.v1.Permission permissions = 1; +} + +message GetPermissionByIDRequest { + string permission_id = 1; +} + +message GetPermissionByIDResponse { + ocis.messages.settings.v1.Permission permission = 1; +} From 7557e4e0ea92d8c2ac1a05b77479aae869e21ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 12 Jan 2022 15:10:15 +0100 Subject: [PATCH 07/20] Migrate proto files for settings and adjusts paths --- accounts/pkg/service/v0/accounts.go | 4 +- .../service/v0/accounts_permission_test.go | 47 +- accounts/pkg/service/v0/option.go | 6 +- accounts/pkg/service/v0/permissions.go | 51 +- accounts/pkg/service/v0/service.go | 6 +- accounts/ui/client/settings/index.js | 134 +- graph/pkg/service/v0/drives.go | 22 +- ocis-pkg/roles/cache.go | 19 +- ocis-pkg/roles/cache_test.go | 13 +- ocis-pkg/roles/manager.go | 14 +- ocis-pkg/roles/option.go | 6 +- ocs/pkg/server/http/svc_test.go | 23 +- ocs/pkg/service/v0/option.go | 6 +- ocs/pkg/service/v0/service.go | 6 +- proxy/pkg/command/server.go | 4 +- proxy/pkg/config/defaultconfig.go | 2 +- proxy/pkg/middleware/options.go | 7 +- proxy/pkg/user/backend/accounts.go | 8 +- proxy/pkg/user/backend/accounts_test.go | 15 +- proxy/pkg/user/backend/backend.go | 6 +- proxy/pkg/user/backend/cs3.go | 10 +- settings/pkg/proto/v0/settings.mock.go | 186 - settings/pkg/proto/v0/settings.pb.go | 3901 ----------------- settings/pkg/proto/v0/settings.pb.micro.go | 668 --- .../pkg/proto/v0/settings.pb.micro_test.go | 1643 ------- settings/pkg/proto/v0/settings.pb.web.go | 1905 -------- settings/pkg/proto/v0/settings.swagger.json | 1114 ----- settings/pkg/server/grpc/server.go | 10 +- settings/pkg/server/http/server.go | 10 +- settings/pkg/service/v0/permissions.go | 22 +- settings/pkg/service/v0/service.go | 79 +- settings/pkg/service/v0/settings.go | 255 +- settings/pkg/service/v0/validator.go | 41 +- settings/pkg/settings/settings.go | 30 +- settings/pkg/store/filesystem/assignments.go | 12 +- .../pkg/store/filesystem/assignments_test.go | 38 +- settings/pkg/store/filesystem/bundles.go | 32 +- settings/pkg/store/filesystem/bundles_test.go | 72 +- settings/pkg/store/filesystem/permissions.go | 20 +- settings/pkg/store/filesystem/values.go | 24 +- settings/pkg/store/filesystem/values_test.go | 20 +- settings/pkg/util/resource_helper.go | 6 +- settings/pkg/util/resource_helper_test.go | 54 +- settings/proto/v0/settings.proto | 416 -- settings/ui/client/settings/index.js | 154 +- 45 files changed, 650 insertions(+), 10471 deletions(-) delete mode 100644 settings/pkg/proto/v0/settings.mock.go delete mode 100644 settings/pkg/proto/v0/settings.pb.go delete mode 100644 settings/pkg/proto/v0/settings.pb.micro.go delete mode 100644 settings/pkg/proto/v0/settings.pb.micro_test.go delete mode 100644 settings/pkg/proto/v0/settings.pb.web.go delete mode 100644 settings/pkg/proto/v0/settings.swagger.json delete mode 100644 settings/proto/v0/settings.proto diff --git a/accounts/pkg/service/v0/accounts.go b/accounts/pkg/service/v0/accounts.go index 21bcb7e0cfd..0052a96ac8e 100644 --- a/accounts/pkg/service/v0/accounts.go +++ b/accounts/pkg/service/v0/accounts.go @@ -28,7 +28,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" "github.com/owncloud/ocis/ocis-pkg/sync" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/rs/zerolog" merrors "go-micro.dev/v4/errors" @@ -455,7 +455,7 @@ func (s Service) CreateAccount(ctx context.Context, in *accountssvc.CreateAccoun if s.RoleService == nil { return merrors.InternalServerError(s.id, "could not assign role to account: roleService not configured") } - if _, err = s.RoleService.AssignRoleToUser(ctx, &settings.AssignRoleToUserRequest{ + if _, err = s.RoleService.AssignRoleToUser(ctx, &settingssvc.AssignRoleToUserRequest{ AccountUuid: out.Id, RoleId: settings_svc.BundleUUIDRoleUser, }); err != nil { diff --git a/accounts/pkg/service/v0/accounts_permission_test.go b/accounts/pkg/service/v0/accounts_permission_test.go index 2de0edc4a88..f98579c2307 100644 --- a/accounts/pkg/service/v0/accounts_permission_test.go +++ b/accounts/pkg/service/v0/accounts_permission_test.go @@ -17,7 +17,8 @@ import ( olog "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" @@ -28,7 +29,7 @@ import ( const dataPath = "/tmp/ocis-accounts-tests" var ( - roleServiceMock settings.RoleService + roleServiceMock settingssvc.RoleService s *Service ) @@ -315,15 +316,15 @@ func buildTestCtx(t *testing.T, roleIDs []string) context.Context { return ctx } -func buildRoleServiceMock() settings.RoleService { - defaultRoles := map[string]*settings.Bundle{ +func buildRoleServiceMock() settingssvc.RoleService { + defaultRoles := map[string]*settingsmsg.Bundle{ ssvc.BundleUUIDRoleAdmin: { Id: ssvc.BundleUUIDRoleAdmin, - Type: settings.Bundle_TYPE_ROLE, - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Type: settingsmsg.Bundle_TYPE_ROLE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{ + Settings: []*settingsmsg.Setting{ { Id: AccountManagementPermissionID, }, @@ -331,37 +332,37 @@ func buildRoleServiceMock() settings.RoleService { }, ssvc.BundleUUIDRoleUser: { Id: ssvc.BundleUUIDRoleUser, - Type: settings.Bundle_TYPE_ROLE, - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Type: settingsmsg.Bundle_TYPE_ROLE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{}, + Settings: []*settingsmsg.Setting{}, }, ssvc.BundleUUIDRoleGuest: { Id: ssvc.BundleUUIDRoleGuest, - Type: settings.Bundle_TYPE_ROLE, - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Type: settingsmsg.Bundle_TYPE_ROLE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{}, + Settings: []*settingsmsg.Setting{}, }, } - return settings.MockRoleService{ - ListRolesFunc: func(ctx context.Context, req *settings.ListBundlesRequest, opts ...client.CallOption) (res *settings.ListBundlesResponse, err error) { - payload := make([]*settings.Bundle, 0) + return settingssvc.MockRoleService{ + ListRolesFunc: func(ctx context.Context, req *settingssvc.ListBundlesRequest, opts ...client.CallOption) (res *settingssvc.ListBundlesResponse, err error) { + payload := make([]*settingsmsg.Bundle, 0) for _, roleID := range req.BundleIds { if defaultRoles[roleID] != nil { payload = append(payload, defaultRoles[roleID]) } } - return &settings.ListBundlesResponse{ + return &settingssvc.ListBundlesResponse{ Bundles: payload, }, nil }, - AssignRoleToUserFunc: func(ctx context.Context, req *settings.AssignRoleToUserRequest, opts ...client.CallOption) (res *settings.AssignRoleToUserResponse, err error) { + AssignRoleToUserFunc: func(ctx context.Context, req *settingssvc.AssignRoleToUserRequest, opts ...client.CallOption) (res *settingssvc.AssignRoleToUserResponse, err error) { // mock can be empty. function is called during service start. actual role assignments not needed for the tests. - return &settings.AssignRoleToUserResponse{ - Assignment: &settings.UserRoleAssignment{}, + return &settingssvc.AssignRoleToUserResponse{ + Assignment: &settingsmsg.UserRoleAssignment{}, }, nil }, } diff --git a/accounts/pkg/service/v0/option.go b/accounts/pkg/service/v0/option.go index 387ff7b35ae..e80fa2e3a23 100644 --- a/accounts/pkg/service/v0/option.go +++ b/accounts/pkg/service/v0/option.go @@ -4,7 +4,7 @@ import ( "github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // Option defines a single option function. @@ -14,7 +14,7 @@ type Option func(o *Options) type Options struct { Logger log.Logger Config *config.Config - RoleService settings.RoleService + RoleService settingssvc.RoleService RoleManager *roles.Manager } @@ -43,7 +43,7 @@ func Config(val *config.Config) Option { } // RoleService provides a function to set the RoleService option. -func RoleService(val settings.RoleService) Option { +func RoleService(val settingssvc.RoleService) Option { return func(o *Options) { o.RoleService = val } diff --git a/accounts/pkg/service/v0/permissions.go b/accounts/pkg/service/v0/permissions.go index 177bb5faaf7..08c628dfb0e 100644 --- a/accounts/pkg/service/v0/permissions.go +++ b/accounts/pkg/service/v0/permissions.go @@ -6,7 +6,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" olog "github.com/owncloud/ocis/ocis-pkg/log" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" ) @@ -27,7 +28,7 @@ const ( // RegisterPermissions registers permissions for account management and group management with the settings service. func RegisterPermissions(l *olog.Logger) { - service := settings.NewBundleService("com.owncloud.api.settings", grpc.DefaultClient) + service := settingssvc.NewBundleService("com.owncloud.api.settings", grpc.DefaultClient) permissionRequests := generateAccountManagementPermissionsRequests() for i := range permissionRequests { @@ -41,61 +42,61 @@ func RegisterPermissions(l *olog.Logger) { } } -func generateAccountManagementPermissionsRequests() []settings.AddSettingToBundleRequest { - return []settings.AddSettingToBundleRequest{ +func generateAccountManagementPermissionsRequests() []settingssvc.AddSettingToBundleRequest { + return []settingssvc.AddSettingToBundleRequest{ { BundleId: ssvc.BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: AccountManagementPermissionID, Name: AccountManagementPermissionName, DisplayName: "Account Management", Description: "This permission gives full access to everything that is related to account management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: ssvc.BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: GroupManagementPermissionID, Name: GroupManagementPermissionName, DisplayName: "Group Management", Description: "This permission gives full access to everything that is related to group management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_GROUP, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_GROUP, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: ssvc.BundleUUIDRoleUser, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: SelfManagementPermissionID, Name: SelfManagementPermissionName, DisplayName: "Self Management", Description: "This permission gives access to self management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "me", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_OWN, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, }, }, }, diff --git a/accounts/pkg/service/v0/service.go b/accounts/pkg/service/v0/service.go index d3beef89526..f5f707b704c 100644 --- a/accounts/pkg/service/v0/service.go +++ b/accounts/pkg/service/v0/service.go @@ -22,7 +22,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" oreg "github.com/owncloud/ocis/ocis-pkg/registry" "github.com/owncloud/ocis/ocis-pkg/roles" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // userDefaultGID is the default integer representing the "users" group. @@ -36,7 +36,7 @@ func New(opts ...Option) (s *Service, err error) { roleService := options.RoleService if roleService == nil { - roleService = settings.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) + roleService = settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) } roleManager := options.RoleManager if roleManager == nil { @@ -447,7 +447,7 @@ type Service struct { log log.Logger Config *config.Config index *indexer.Indexer - RoleService settings.RoleService + RoleService settingssvc.RoleService RoleManager *roles.Manager repo storage.Repo } diff --git a/accounts/ui/client/settings/index.js b/accounts/ui/client/settings/index.js index 9c2fd5647c4..69dce246ec7 100644 --- a/accounts/ui/client/settings/index.js +++ b/accounts/ui/client/settings/index.js @@ -25,20 +25,20 @@ export const request = (method, url, body, queryParameters, form, config) => { } } /*========================================================== - * + * ==========================================================*/ /** - * + * * request: RoleService_AssignRoleToUser * url: RoleService_AssignRoleToUserURL * method: RoleService_AssignRoleToUser_TYPE * raw_url: RoleService_AssignRoleToUser_RAW_URL - * @param body - + * @param body - */ export const RoleService_AssignRoleToUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-add' + let path = '/api/v1/settings/assignments-add' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const RoleService_AssignRoleToUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_AssignRoleToUser_RAW_URL = function() { - return '/api/v0/settings/assignments-add' + return '/api/v1/settings/assignments-add' } export const RoleService_AssignRoleToUser_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const RoleService_AssignRoleToUser_TYPE = function() { export const RoleService_AssignRoleToUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-add' + let path = '/api/v1/settings/assignments-add' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -74,17 +74,17 @@ export const RoleService_AssignRoleToUserURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_ListRoleAssignments * url: RoleService_ListRoleAssignmentsURL * method: RoleService_ListRoleAssignments_TYPE * raw_url: RoleService_ListRoleAssignments_RAW_URL - * @param body - + * @param body - */ export const RoleService_ListRoleAssignments = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-list' + let path = '/api/v1/settings/assignments-list' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const RoleService_ListRoleAssignments = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoleAssignments_RAW_URL = function() { - return '/api/v0/settings/assignments-list' + return '/api/v1/settings/assignments-list' } export const RoleService_ListRoleAssignments_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const RoleService_ListRoleAssignments_TYPE = function() { export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-list' + let path = '/api/v1/settings/assignments-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -120,17 +120,17 @@ export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_RemoveRoleFromUser * url: RoleService_RemoveRoleFromUserURL * method: RoleService_RemoveRoleFromUser_TYPE * raw_url: RoleService_RemoveRoleFromUser_RAW_URL - * @param body - + * @param body - */ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-remove' + let path = '/api/v1/settings/assignments-remove' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_RemoveRoleFromUser_RAW_URL = function() { - return '/api/v0/settings/assignments-remove' + return '/api/v1/settings/assignments-remove' } export const RoleService_RemoveRoleFromUser_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const RoleService_RemoveRoleFromUser_TYPE = function() { export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-remove' + let path = '/api/v1/settings/assignments-remove' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -166,17 +166,17 @@ export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_GetBundle * url: BundleService_GetBundleURL * method: BundleService_GetBundle_TYPE * raw_url: BundleService_GetBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_GetBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundle-get' + let path = '/api/v1/settings/bundle-get' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const BundleService_GetBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_GetBundle_RAW_URL = function() { - return '/api/v0/settings/bundle-get' + return '/api/v1/settings/bundle-get' } export const BundleService_GetBundle_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const BundleService_GetBundle_TYPE = function() { export const BundleService_GetBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundle-get' + let path = '/api/v1/settings/bundle-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -212,17 +212,17 @@ export const BundleService_GetBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_SaveBundle * url: BundleService_SaveBundleURL * method: BundleService_SaveBundle_TYPE * raw_url: BundleService_SaveBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_SaveBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundle-save' + let path = '/api/v1/settings/bundle-save' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const BundleService_SaveBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_SaveBundle_RAW_URL = function() { - return '/api/v0/settings/bundle-save' + return '/api/v1/settings/bundle-save' } export const BundleService_SaveBundle_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const BundleService_SaveBundle_TYPE = function() { export const BundleService_SaveBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundle-save' + let path = '/api/v1/settings/bundle-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -258,17 +258,17 @@ export const BundleService_SaveBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_AddSettingToBundle * url: BundleService_AddSettingToBundleURL * method: BundleService_AddSettingToBundle_TYPE * raw_url: BundleService_AddSettingToBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_AddSettingToBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-add-setting' + let path = '/api/v1/settings/bundles-add-setting' let body let queryParameters = {} let form = {} @@ -286,7 +286,7 @@ export const BundleService_AddSettingToBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_AddSettingToBundle_RAW_URL = function() { - return '/api/v0/settings/bundles-add-setting' + return '/api/v1/settings/bundles-add-setting' } export const BundleService_AddSettingToBundle_TYPE = function() { return 'post' @@ -294,7 +294,7 @@ export const BundleService_AddSettingToBundle_TYPE = function() { export const BundleService_AddSettingToBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-add-setting' + let path = '/api/v1/settings/bundles-add-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -304,17 +304,17 @@ export const BundleService_AddSettingToBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_ListBundles * url: BundleService_ListBundlesURL * method: BundleService_ListBundles_TYPE * raw_url: BundleService_ListBundles_RAW_URL - * @param body - + * @param body - */ export const BundleService_ListBundles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-list' + let path = '/api/v1/settings/bundles-list' let body let queryParameters = {} let form = {} @@ -332,7 +332,7 @@ export const BundleService_ListBundles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_ListBundles_RAW_URL = function() { - return '/api/v0/settings/bundles-list' + return '/api/v1/settings/bundles-list' } export const BundleService_ListBundles_TYPE = function() { return 'post' @@ -340,7 +340,7 @@ export const BundleService_ListBundles_TYPE = function() { export const BundleService_ListBundlesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-list' + let path = '/api/v1/settings/bundles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -350,17 +350,17 @@ export const BundleService_ListBundlesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_RemoveSettingFromBundle * url: BundleService_RemoveSettingFromBundleURL * method: BundleService_RemoveSettingFromBundle_TYPE * raw_url: BundleService_RemoveSettingFromBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-remove-setting' + let path = '/api/v1/settings/bundles-remove-setting' let body let queryParameters = {} let form = {} @@ -378,7 +378,7 @@ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_RemoveSettingFromBundle_RAW_URL = function() { - return '/api/v0/settings/bundles-remove-setting' + return '/api/v1/settings/bundles-remove-setting' } export const BundleService_RemoveSettingFromBundle_TYPE = function() { return 'post' @@ -386,7 +386,7 @@ export const BundleService_RemoveSettingFromBundle_TYPE = function() { export const BundleService_RemoveSettingFromBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-remove-setting' + let path = '/api/v1/settings/bundles-remove-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -396,17 +396,17 @@ export const BundleService_RemoveSettingFromBundleURL = function(parameters = {} return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_ListRoles * url: RoleService_ListRolesURL * method: RoleService_ListRoles_TYPE * raw_url: RoleService_ListRoles_RAW_URL - * @param body - + * @param body - */ export const RoleService_ListRoles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/roles-list' + let path = '/api/v1/settings/roles-list' let body let queryParameters = {} let form = {} @@ -424,7 +424,7 @@ export const RoleService_ListRoles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoles_RAW_URL = function() { - return '/api/v0/settings/roles-list' + return '/api/v1/settings/roles-list' } export const RoleService_ListRoles_TYPE = function() { return 'post' @@ -432,7 +432,7 @@ export const RoleService_ListRoles_TYPE = function() { export const RoleService_ListRolesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/roles-list' + let path = '/api/v1/settings/roles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -442,17 +442,17 @@ export const RoleService_ListRolesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_GetValue * url: ValueService_GetValueURL * method: ValueService_GetValue_TYPE * raw_url: ValueService_GetValue_RAW_URL - * @param body - + * @param body - */ export const ValueService_GetValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-get' + let path = '/api/v1/settings/values-get' let body let queryParameters = {} let form = {} @@ -470,7 +470,7 @@ export const ValueService_GetValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValue_RAW_URL = function() { - return '/api/v0/settings/values-get' + return '/api/v1/settings/values-get' } export const ValueService_GetValue_TYPE = function() { return 'post' @@ -478,7 +478,7 @@ export const ValueService_GetValue_TYPE = function() { export const ValueService_GetValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-get' + let path = '/api/v1/settings/values-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -488,17 +488,17 @@ export const ValueService_GetValueURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_GetValueByUniqueIdentifiers * url: ValueService_GetValueByUniqueIdentifiersURL * method: ValueService_GetValueByUniqueIdentifiers_TYPE * raw_url: ValueService_GetValueByUniqueIdentifiers_RAW_URL - * @param body - + * @param body - */ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-get-by-unique-identifiers' + let path = '/api/v1/settings/values-get-by-unique-identifiers' let body let queryParameters = {} let form = {} @@ -516,7 +516,7 @@ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {} return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValueByUniqueIdentifiers_RAW_URL = function() { - return '/api/v0/settings/values-get-by-unique-identifiers' + return '/api/v1/settings/values-get-by-unique-identifiers' } export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { return 'post' @@ -524,7 +524,7 @@ export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-get-by-unique-identifiers' + let path = '/api/v1/settings/values-get-by-unique-identifiers' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -534,17 +534,17 @@ export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_ListValues * url: ValueService_ListValuesURL * method: ValueService_ListValues_TYPE * raw_url: ValueService_ListValues_RAW_URL - * @param body - + * @param body - */ export const ValueService_ListValues = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-list' + let path = '/api/v1/settings/values-list' let body let queryParameters = {} let form = {} @@ -562,7 +562,7 @@ export const ValueService_ListValues = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_ListValues_RAW_URL = function() { - return '/api/v0/settings/values-list' + return '/api/v1/settings/values-list' } export const ValueService_ListValues_TYPE = function() { return 'post' @@ -570,7 +570,7 @@ export const ValueService_ListValues_TYPE = function() { export const ValueService_ListValuesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-list' + let path = '/api/v1/settings/values-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -580,17 +580,17 @@ export const ValueService_ListValuesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_SaveValue * url: ValueService_SaveValueURL * method: ValueService_SaveValue_TYPE * raw_url: ValueService_SaveValue_RAW_URL - * @param body - + * @param body - */ export const ValueService_SaveValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-save' + let path = '/api/v1/settings/values-save' let body let queryParameters = {} let form = {} @@ -608,7 +608,7 @@ export const ValueService_SaveValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_SaveValue_RAW_URL = function() { - return '/api/v0/settings/values-save' + return '/api/v1/settings/values-save' } export const ValueService_SaveValue_TYPE = function() { return 'post' @@ -616,7 +616,7 @@ export const ValueService_SaveValue_TYPE = function() { export const ValueService_SaveValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-save' + let path = '/api/v1/settings/values-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -624,4 +624,4 @@ export const ValueService_SaveValueURL = function(parameters = {}) { } let keys = Object.keys(queryParameters) return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') -} \ No newline at end of file +} diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index 58933a6ea31..bdec0507dd3 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -26,8 +26,8 @@ import ( "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/graph/pkg/service/v0/net" "github.com/owncloud/ocis/ocis-pkg/service/grpc" - sproto "github.com/owncloud/ocis/settings/pkg/proto/v0" - settingsSvc "github.com/owncloud/ocis/settings/pkg/service/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsServiceExt "github.com/owncloud/ocis/settings/pkg/service/v0" "gopkg.in/yaml.v2" merrors "go-micro.dev/v4/errors" @@ -155,10 +155,10 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) { return } - s := sproto.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) + s := settingssvc.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) - _, err := s.GetPermissionByID(r.Context(), &sproto.GetPermissionByIDRequest{ - PermissionId: settingsSvc.CreateSpacePermissionID, + _, err := s.GetPermissionByID(r.Context(), &settingssvc.GetPermissionByIDRequest{ + PermissionId: settingsServiceExt.CreateSpacePermissionID, }) if err != nil { // if the permission is not existing for the user in context we can assume we don't have it. Return 401. @@ -379,15 +379,15 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor client := g.GetGatewayClient() permissions := make(map[string]struct{}, 1) - s := sproto.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) + s := settingssvc.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) - _, err := s.GetPermissionByID(ctx, &sproto.GetPermissionByIDRequest{ - PermissionId: settingsSvc.ListAllSpacesPermissionID, + _, err := s.GetPermissionByID(ctx, &settingssvc.GetPermissionByIDRequest{ + PermissionId: settingsServiceExt.ListAllSpacesPermissionID, }) // No error means the user has the permission if err == nil { - permissions[settingsSvc.ListAllSpacesPermissionName] = struct{}{} + permissions[settingsServiceExt.ListAllSpacesPermissionName] = struct{}{} } value, err := json.Marshal(permissions) if err != nil { @@ -683,8 +683,8 @@ func getQuota(quota *libregraph.Quota, defaultQuota string) *storageprovider.Quo } func canSetSpaceQuota(ctx context.Context, user *userv1beta1.User) (bool, error) { - settingsService := sproto.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) - _, err := settingsService.GetPermissionByID(ctx, &sproto.GetPermissionByIDRequest{PermissionId: settingsSvc.SetSpaceQuotaPermissionID}) + settingsService := settingssvc.NewPermissionService("com.owncloud.api.settings", grpc.DefaultClient) + _, err := settingsService.GetPermissionByID(ctx, &settingssvc.GetPermissionByIDRequest{PermissionId: settingsServiceExt.SetSpaceQuotaPermissionID}) if err != nil { merror := merrors.FromError(err) if merror.Status == http.StatusText(http.StatusNotFound) { diff --git a/ocis-pkg/roles/cache.go b/ocis-pkg/roles/cache.go index e5cb1d9cc73..8b94c8dd1d7 100644 --- a/ocis-pkg/roles/cache.go +++ b/ocis-pkg/roles/cache.go @@ -2,34 +2,35 @@ package roles import ( "time" + "github.com/owncloud/ocis/ocis-pkg/sync" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" ) // cache is a cache implementation for roles, keyed by roleIDs. type cache struct { - sc sync.Cache - ttl time.Duration + sc sync.Cache + ttl time.Duration } // newCache returns a new instance of Cache. func newCache(capacity int, ttl time.Duration) cache { return cache{ - ttl: ttl, - sc: sync.NewCache(capacity), + ttl: ttl, + sc: sync.NewCache(capacity), } } // get gets a role-bundle by a given `roleID`. -func (c *cache) get(roleID string) *settings.Bundle { +func (c *cache) get(roleID string) *settingsmsg.Bundle { if ce := c.sc.Load(roleID); ce != nil { - return ce.V.(*settings.Bundle) + return ce.V.(*settingsmsg.Bundle) } return nil } // set sets a roleID / role-bundle. -func (c *cache) set(roleID string, value *settings.Bundle) { +func (c *cache) set(roleID string, value *settingsmsg.Bundle) { c.sc.Store(roleID, value, time.Now().Add(c.ttl)) -} \ No newline at end of file +} diff --git a/ocis-pkg/roles/cache_test.go b/ocis-pkg/roles/cache_test.go index bca68180153..7300e5a59ac 100644 --- a/ocis-pkg/roles/cache_test.go +++ b/ocis-pkg/roles/cache_test.go @@ -1,12 +1,13 @@ package roles import ( - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" - "github.com/stretchr/testify/assert" "strconv" "sync" "testing" "time" + + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + "github.com/stretchr/testify/assert" ) func cacheRunner(size int, ttl time.Duration) (*cache, func(f func(v string))) { @@ -29,10 +30,10 @@ func cacheRunner(size int, ttl time.Duration) (*cache, func(f func(v string))) { func BenchmarkCache(b *testing.B) { b.ReportAllocs() size := 1024 - c, cr := cacheRunner(size, 100 * time.Millisecond) + c, cr := cacheRunner(size, 100*time.Millisecond) - cr(func(v string) { c.set(v, &settings.Bundle{})}) - cr(func(v string) { c.get(v)}) + cr(func(v string) { c.set(v, &settingsmsg.Bundle{}) }) + cr(func(v string) { c.get(v) }) } func TestCache(t *testing.T) { @@ -41,7 +42,7 @@ func TestCache(t *testing.T) { c, cr := cacheRunner(size, ttl) cr(func(v string) { - c.set(v, &settings.Bundle{Id: v}) + c.set(v, &settingsmsg.Bundle{Id: v}) }) assert.Equal(t, "50", c.get("50").Id, "it returns the right bundle") diff --git a/ocis-pkg/roles/manager.go b/ocis-pkg/roles/manager.go index 040310d9f94..afe8cc1167c 100644 --- a/ocis-pkg/roles/manager.go +++ b/ocis-pkg/roles/manager.go @@ -4,14 +4,15 @@ import ( "context" "github.com/owncloud/ocis/ocis-pkg/log" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // Manager manages a cache of roles by fetching unknown roles from the settings.RoleService. type Manager struct { logger log.Logger cache cache - roleService settings.RoleService + roleService settingssvc.RoleService } // NewManager returns a new instance of Manager. @@ -25,9 +26,9 @@ func NewManager(o ...Option) Manager { } // List returns all roles that match the given roleIDs. -func (m *Manager) List(ctx context.Context, roleIDs []string) []*settings.Bundle { +func (m *Manager) List(ctx context.Context, roleIDs []string) []*settingsmsg.Bundle { // get from cache - result := make([]*settings.Bundle, 0) + result := make([]*settingsmsg.Bundle, 0) lookup := make([]string, 0) for _, roleID := range roleIDs { if hit := m.cache.get(roleID); hit == nil { @@ -39,7 +40,7 @@ func (m *Manager) List(ctx context.Context, roleIDs []string) []*settings.Bundle // if there are roles missing, fetch them from the RoleService if len(lookup) > 0 { - request := &settings.ListBundlesRequest{ + request := &settingssvc.ListBundlesRequest{ BundleIds: lookup, } res, err := m.roleService.ListRoles(ctx, request) @@ -56,7 +57,7 @@ func (m *Manager) List(ctx context.Context, roleIDs []string) []*settings.Bundle } // FindPermissionByID searches for a permission-setting by the permissionID, but limited to the given roleIDs -func (m *Manager) FindPermissionByID(ctx context.Context, roleIDs []string, permissionID string) *settings.Setting { +func (m *Manager) FindPermissionByID(ctx context.Context, roleIDs []string, permissionID string) *settingsmsg.Setting { for _, role := range m.List(ctx, roleIDs) { for _, setting := range role.Settings { if setting.Id == permissionID { @@ -66,4 +67,3 @@ func (m *Manager) FindPermissionByID(ctx context.Context, roleIDs []string, perm } return nil } - diff --git a/ocis-pkg/roles/option.go b/ocis-pkg/roles/option.go index 13e939953b8..5f3460cd14a 100644 --- a/ocis-pkg/roles/option.go +++ b/ocis-pkg/roles/option.go @@ -4,7 +4,7 @@ import ( "time" "github.com/owncloud/ocis/ocis-pkg/log" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // Options are all the possible options. @@ -12,7 +12,7 @@ type Options struct { size int ttl time.Duration logger log.Logger - roleService settings.RoleService + roleService settingssvc.RoleService } // Option mutates option @@ -40,7 +40,7 @@ func Logger(logger log.Logger) Option { } // RoleService provides endpoints for fetching roles. -func RoleService(rs settings.RoleService) Option { +func RoleService(rs settingssvc.RoleService) Option { return func(o *Options) { o.roleService = rs } diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index b01095589cb..ae6a2d5db3e 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -28,7 +28,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocs/pkg/config" svc "github.com/owncloud/ocis/ocs/pkg/service/v0" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" @@ -512,23 +513,23 @@ func deleteGroup(t *testing.T, id string) (*empty.Empty, error) { return res, err } -func buildRoleServiceMock() settings.RoleService { - return settings.MockRoleService{ - AssignRoleToUserFunc: func(ctx context.Context, req *settings.AssignRoleToUserRequest, opts ...client.CallOption) (res *settings.AssignRoleToUserResponse, err error) { +func buildRoleServiceMock() settingssvc.RoleService { + return settingssvc.MockRoleService{ + AssignRoleToUserFunc: func(ctx context.Context, req *settingssvc.AssignRoleToUserRequest, opts ...client.CallOption) (res *settingssvc.AssignRoleToUserResponse, err error) { mockedRoleAssignment[req.AccountUuid] = req.RoleId - return &settings.AssignRoleToUserResponse{ - Assignment: &settings.UserRoleAssignment{ + return &settingssvc.AssignRoleToUserResponse{ + Assignment: &settingssvc.UserRoleAssignment{ AccountUuid: req.AccountUuid, RoleId: req.RoleId, }, }, nil }, - ListRolesFunc: func(ctx context.Context, req *settings.ListBundlesRequest, opts ...client.CallOption) (*settings.ListBundlesResponse, error) { - return &settings.ListBundlesResponse{ - Bundles: []*settings.Bundle{ + ListRolesFunc: func(ctx context.Context, req *settingssvc.ListBundlesRequest, opts ...client.CallOption) (*settingssvc.ListBundlesResponse, error) { + return &settingssvc.ListBundlesResponse{ + Bundles: []*settingsmsg.Bundle{ { Id: ssvc.BundleUUIDRoleAdmin, - Settings: []*settings.Setting{ + Settings: []*settingsmsg.Setting{ { Id: accountsSvc.AccountManagementPermissionID, }, @@ -536,7 +537,7 @@ func buildRoleServiceMock() settings.RoleService { }, { Id: ssvc.BundleUUIDRoleUser, - Settings: []*settings.Setting{ + Settings: []*settingsmsg.Setting{ { Id: accountsSvc.SelfManagementPermissionID, }, diff --git a/ocs/pkg/service/v0/option.go b/ocs/pkg/service/v0/option.go index 4de1623f2bc..c0d97710cc9 100644 --- a/ocs/pkg/service/v0/option.go +++ b/ocs/pkg/service/v0/option.go @@ -6,7 +6,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" "github.com/owncloud/ocis/ocs/pkg/config" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // Option defines a single option function. @@ -17,7 +17,7 @@ type Options struct { Logger log.Logger Config *config.Config Middleware []func(http.Handler) http.Handler - RoleService settings.RoleService + RoleService settingssvc.RoleService RoleManager *roles.Manager } @@ -54,7 +54,7 @@ func Middleware(val ...func(http.Handler) http.Handler) Option { } // RoleService provides a function to set the RoleService option. -func RoleService(val settings.RoleService) Option { +func RoleService(val settingssvc.RoleService) Option { return func(o *Options) { o.RoleService = val } diff --git a/ocs/pkg/service/v0/service.go b/ocs/pkg/service/v0/service.go index 5a20171daf9..368c1f38e08 100644 --- a/ocs/pkg/service/v0/service.go +++ b/ocs/pkg/service/v0/service.go @@ -21,8 +21,8 @@ import ( ocsm "github.com/owncloud/ocis/ocs/pkg/middleware" "github.com/owncloud/ocis/ocs/pkg/service/v0/data" "github.com/owncloud/ocis/ocs/pkg/service/v0/response" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/owncloud/ocis/proxy/pkg/user/backend" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" ) // Service defines the extension handlers. @@ -40,7 +40,7 @@ func NewService(opts ...Option) Service { roleService := options.RoleService if roleService == nil { - roleService = settings.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) + roleService = settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) } roleManager := options.RoleManager if roleManager == nil { @@ -144,7 +144,7 @@ func NewService(opts ...Option) Service { type Ocs struct { config *config.Config logger log.Logger - RoleService settings.RoleService + RoleService settingssvc.RoleService RoleManager *roles.Manager mux *chi.Mux } diff --git a/proxy/pkg/command/server.go b/proxy/pkg/command/server.go index 7ed603614be..fae2570ba4c 100644 --- a/proxy/pkg/command/server.go +++ b/proxy/pkg/command/server.go @@ -18,6 +18,7 @@ import ( pkgmiddleware "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/owncloud/ocis/proxy/pkg/config" "github.com/owncloud/ocis/proxy/pkg/config/parser" "github.com/owncloud/ocis/proxy/pkg/cs3" @@ -29,7 +30,6 @@ import ( proxyHTTP "github.com/owncloud/ocis/proxy/pkg/server/http" "github.com/owncloud/ocis/proxy/pkg/tracing" "github.com/owncloud/ocis/proxy/pkg/user/backend" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" storepb "github.com/owncloud/ocis/store/pkg/proto/v0" "github.com/urfave/cli/v2" "golang.org/x/oauth2" @@ -126,7 +126,7 @@ func Server(cfg *config.Config) *cli.Command { } func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config) alice.Chain { - rolesClient := settings.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) + rolesClient := settingssvc.NewRoleService("com.owncloud.api.settings", grpc.DefaultClient) revaClient, err := cs3.GetGatewayServiceClient(cfg.Reva.Address) var userProvider backend.UserBackend switch cfg.AccountBackend { diff --git a/proxy/pkg/config/defaultconfig.go b/proxy/pkg/config/defaultconfig.go index a5b1611e390..546a9a8be23 100644 --- a/proxy/pkg/config/defaultconfig.go +++ b/proxy/pkg/config/defaultconfig.go @@ -141,7 +141,7 @@ func DefaultPolicies() []Policy { Backend: "http://localhost:9181", }, { - Endpoint: "/api/v0/settings", + Endpoint: "/api/v1/settings", Backend: "http://localhost:9190", }, { diff --git a/proxy/pkg/middleware/options.go b/proxy/pkg/middleware/options.go index 0ef5f86d844..bf313540372 100644 --- a/proxy/pkg/middleware/options.go +++ b/proxy/pkg/middleware/options.go @@ -6,9 +6,8 @@ import ( "github.com/owncloud/ocis/proxy/pkg/user/backend" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" "github.com/owncloud/ocis/ocis-pkg/log" @@ -34,7 +33,7 @@ type Options struct { // UP UserProvider backend.UserBackend // SettingsRoleService for the roles API in settings - SettingsRoleService settings.RoleService + SettingsRoleService settingssvc.RoleService // OIDCProviderFunc to lazily initialize an oidc provider, must be set for the oidc_auth middleware OIDCProviderFunc func() (OIDCProvider, error) // OIDCIss is the oidcAuth-issuer @@ -108,7 +107,7 @@ func AccountsClient(ac accountssvc.AccountsService) Option { } // SettingsRoleService provides a function to set the role service option. -func SettingsRoleService(rc settings.RoleService) Option { +func SettingsRoleService(rc settingssvc.RoleService) Option { return func(o *Options) { o.SettingsRoleService = rc } diff --git a/proxy/pkg/user/backend/accounts.go b/proxy/pkg/user/backend/accounts.go index 7142364ef8b..f5d19fc56be 100644 --- a/proxy/pkg/user/backend/accounts.go +++ b/proxy/pkg/user/backend/accounts.go @@ -15,11 +15,11 @@ import ( "github.com/cs3org/reva/pkg/token" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) // NewAccountsServiceUserBackend creates a user-provider which fetches users from the ocis accounts-service -func NewAccountsServiceUserBackend(ac accountssvc.AccountsService, rs settings.RoleService, oidcISS string, tokenManager token.Manager, logger log.Logger) UserBackend { +func NewAccountsServiceUserBackend(ac accountssvc.AccountsService, rs settingssvc.RoleService, oidcISS string, tokenManager token.Manager, logger log.Logger) UserBackend { return &accountsServiceBackend{ accountsClient: ac, settingsRoleService: rs, @@ -31,7 +31,7 @@ func NewAccountsServiceUserBackend(ac accountssvc.AccountsService, rs settings.R type accountsServiceBackend struct { accountsClient accountssvc.AccountsService - settingsRoleService settings.RoleService + settingsRoleService settingssvc.RoleService OIDCIss string logger log.Logger tokenManager token.Manager @@ -228,7 +228,7 @@ func expandGroups(account *accountsmsg.Account) []string { } // injectRoles adds roles from the roles-service to the user-struct by mutating an existing struct -func injectRoles(ctx context.Context, u *cs3.User, ss settings.RoleService) error { +func injectRoles(ctx context.Context, u *cs3.User, ss settingssvc.RoleService) error { roleIDs, err := loadRolesIDs(ctx, u.Id.OpaqueId, ss) if err != nil { return err diff --git a/proxy/pkg/user/backend/accounts_test.go b/proxy/pkg/user/backend/accounts_test.go index ed2a33b66c8..b54d070bf57 100644 --- a/proxy/pkg/user/backend/accounts_test.go +++ b/proxy/pkg/user/backend/accounts_test.go @@ -9,7 +9,8 @@ import ( accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" @@ -32,7 +33,7 @@ var mockAccResp = []*accounts.Account{ }, } -var expectedRoles = []*settings.UserRoleAssignment{ +var expectedRoles = []*settingsmsg.UserRoleAssignment{ {Id: "abc", AccountUuid: "1234", RoleId: "a"}, {Id: "def", AccountUuid: "1234", RoleId: "b"}, } @@ -150,7 +151,7 @@ func assertUserMatchesAccount(t *testing.T, exp *accounts.Account, act *userv1be assert.Equal(t, int64(2), act.GidNumber) } -func newAccountsBackend(mockAccounts []*accounts.Account, mockRoles []*settings.UserRoleAssignment) UserBackend { +func newAccountsBackend(mockAccounts []*accounts.Account, mockRoles []*settingsmsg.UserRoleAssignment) UserBackend { accSvc, roleSvc := getAccountService(mockAccounts, nil), getRoleService(mockRoles, nil) tokenManager, _ := jwt.New(map[string]interface{}{ "secret": "change-me", @@ -174,10 +175,10 @@ func getAccountService(expectedResponse []*accounts.Account, err error) *account } } -func getRoleService(expectedResponse []*settings.UserRoleAssignment, err error) *settings.MockRoleService { - return &settings.MockRoleService{ - ListRoleAssignmentsFunc: func(ctx context.Context, req *settings.ListRoleAssignmentsRequest, opts ...client.CallOption) (*settings.ListRoleAssignmentsResponse, error) { - return &settings.ListRoleAssignmentsResponse{Assignments: expectedResponse}, err +func getRoleService(expectedResponse []*settingsmsg.UserRoleAssignment, err error) *settingssvc.MockRoleService { + return &settingssvc.MockRoleService{ + ListRoleAssignmentsFunc: func(ctx context.Context, req *settingssvc.ListRoleAssignmentsRequest, opts ...client.CallOption) (*settingssvc.ListRoleAssignmentsResponse, error) { + return &settingssvc.ListRoleAssignmentsResponse{Assignments: expectedResponse}, err }, } diff --git a/proxy/pkg/user/backend/backend.go b/proxy/pkg/user/backend/backend.go index ab3fb3c0667..cc6cf835303 100644 --- a/proxy/pkg/user/backend/backend.go +++ b/proxy/pkg/user/backend/backend.go @@ -8,7 +8,7 @@ import ( gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "google.golang.org/grpc" ) @@ -35,8 +35,8 @@ type RevaAuthenticator interface { } // loadRolesIDs returns the role-ids assigned to an user -func loadRolesIDs(ctx context.Context, opaqueUserID string, rs settings.RoleService) ([]string, error) { - req := &settings.ListRoleAssignmentsRequest{AccountUuid: opaqueUserID} +func loadRolesIDs(ctx context.Context, opaqueUserID string, rs settingssvc.RoleService) ([]string, error) { + req := &settingssvc.ListRoleAssignmentsRequest{AccountUuid: opaqueUserID} assignmentResponse, err := rs.ListRoleAssignments(ctx, req) if err != nil { diff --git a/proxy/pkg/user/backend/cs3.go b/proxy/pkg/user/backend/cs3.go index 4623c7d5c86..43f532a9de4 100644 --- a/proxy/pkg/user/backend/cs3.go +++ b/proxy/pkg/user/backend/cs3.go @@ -9,19 +9,19 @@ import ( rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/owncloud/ocis/ocis-pkg/log" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" - settingsSvc "github.com/owncloud/ocis/settings/pkg/service/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsService "github.com/owncloud/ocis/settings/pkg/service/v0" ) type cs3backend struct { - settingsRoleService settings.RoleService + settingsRoleService settingssvc.RoleService authProvider RevaAuthenticator machineAuthAPIKey string logger log.Logger } // NewCS3UserBackend creates a user-provider which fetches users from a CS3 UserBackend -func NewCS3UserBackend(rs settings.RoleService, ap RevaAuthenticator, machineAuthAPIKey string, logger log.Logger) UserBackend { +func NewCS3UserBackend(rs settingssvc.RoleService, ap RevaAuthenticator, machineAuthAPIKey string, logger log.Logger) UserBackend { return &cs3backend{ settingsRoleService: rs, authProvider: ap, @@ -62,7 +62,7 @@ func (c *cs3backend) GetUserByClaims(ctx context.Context, claim, value string, w } if len(roleIDs) == 0 { - roleIDs = append(roleIDs, settingsSvc.BundleUUIDRoleUser, settingsSvc.SelfManagementPermissionID) + roleIDs = append(roleIDs, settingsService.BundleUUIDRoleUser, settingsService.SelfManagementPermissionID) // if roles are empty, assume we haven't seen the user before and assign a default user role. At least until // proper roles are provided. See https://github.com/owncloud/ocis/issues/1825 for more context. //return user, nil diff --git a/settings/pkg/proto/v0/settings.mock.go b/settings/pkg/proto/v0/settings.mock.go deleted file mode 100644 index 060ded41d70..00000000000 --- a/settings/pkg/proto/v0/settings.mock.go +++ /dev/null @@ -1,186 +0,0 @@ -package proto - -import ( - "context" - - "go-micro.dev/v4/client" - "google.golang.org/protobuf/types/known/emptypb" -) - -// MockBundleService can be used to write tests against the bundle service. -/* -To create a mock overwrite the functions of an instance like this: - -```go -func mockBundleSvc(returnErr bool) proto.BundleService { - if returnErr { - return &proto.MockBundleService{ - ListBundlesFunc: func(ctx context.Context, in *proto.ListBundlesRequest, opts ...client.CallOption) (out *proto.ListBundlesResponse, err error) { - return nil, fmt.Errorf("error returned by mockBundleSvc LIST") - }, - } - } - - return &proto.MockBundleService{ - ListBundlesFunc: func(ctx context.Context, in *proto.ListBundlesRequest, opts ...client.CallOption) (out *proto.ListBundlesResponse, err error) { - return &proto.ListBundlesResponse{ - Bundles: []*proto.Bundle{ - { - Id: "hello-there", - }, - }, - }, nil - }, - } -} -``` -*/ -type MockBundleService struct { - ListBundlesFunc func(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) - GetBundleFunc func(ctx context.Context, req *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) - SaveBundleFunc func(ctx context.Context, req *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) - AddSettingToBundleFunc func(ctx context.Context, req *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) - RemoveSettingFromBundleFunc func(ctx context.Context, req *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -// ListBundles will panic if the function has been called, but not mocked -func (m MockBundleService) ListBundles(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { - if m.ListBundlesFunc != nil { - return m.ListBundlesFunc(ctx, req, opts...) - } - panic("ListBundlesFunc was called in test but not mocked") -} - -// GetBundle will panic if the function has been called, but not mocked -func (m MockBundleService) GetBundle(ctx context.Context, req *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) { - if m.GetBundleFunc != nil { - return m.GetBundleFunc(ctx, req, opts...) - } - panic("GetBundleFunc was called in test but not mocked") -} - -// SaveBundle will panic if the function has been called, but not mocked -func (m MockBundleService) SaveBundle(ctx context.Context, req *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) { - if m.SaveBundleFunc != nil { - return m.SaveBundleFunc(ctx, req, opts...) - } - panic("SaveBundleFunc was called in test but not mocked") -} - -// AddSettingToBundle will panic if the function has been called, but not mocked -func (m MockBundleService) AddSettingToBundle(ctx context.Context, req *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) { - if m.AddSettingToBundleFunc != nil { - return m.AddSettingToBundleFunc(ctx, req, opts...) - } - panic("AddSettingToBundleFunc was called in test but not mocked") -} - -// RemoveSettingFromBundle will panic if the function has been called, but not mocked -func (m MockBundleService) RemoveSettingFromBundle(ctx context.Context, req *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - if m.RemoveSettingFromBundleFunc != nil { - return m.RemoveSettingFromBundleFunc(ctx, req, opts...) - } - panic("RemoveSettingFromBundleFunc was called in test but not mocked") -} - -// MockValueService can be used to write tests against the value service. -type MockValueService struct { - ListValuesFunc func(ctx context.Context, req *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) - GetValueFunc func(ctx context.Context, req *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) - GetValueByUniqueIdentifiersFunc func(ctx context.Context, req *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) - SaveValueFunc func(ctx context.Context, req *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) -} - -// ListValues will panic if the function has been called, but not mocked -func (m MockValueService) ListValues(ctx context.Context, req *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) { - if m.ListValuesFunc != nil { - return m.ListValuesFunc(ctx, req, opts...) - } - panic("ListValuesFunc was called in test but not mocked") -} - -// GetValue will panic if the function has been called, but not mocked -func (m MockValueService) GetValue(ctx context.Context, req *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) { - if m.GetValueFunc != nil { - return m.GetValueFunc(ctx, req, opts...) - } - panic("GetValueFunc was called in test but not mocked") -} - -// GetValueByUniqueIdentifiers will panic if the function has been called, but not mocked -func (m MockValueService) GetValueByUniqueIdentifiers(ctx context.Context, req *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) { - if m.GetValueByUniqueIdentifiersFunc != nil { - return m.GetValueByUniqueIdentifiersFunc(ctx, req, opts...) - } - panic("GetValueByUniqueIdentifiersFunc was called in test but not mocked") -} - -// SaveValue will panic if the function has been called, but not mocked -func (m MockValueService) SaveValue(ctx context.Context, req *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) { - if m.SaveValueFunc != nil { - return m.SaveValueFunc(ctx, req, opts...) - } - panic("SaveValueFunc was called in test but not mocked") -} - -// MockRoleService will panic if the function has been called, but not mocked -type MockRoleService struct { - ListRolesFunc func(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) - ListRoleAssignmentsFunc func(ctx context.Context, req *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) - AssignRoleToUserFunc func(ctx context.Context, req *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) - RemoveRoleFromUserFunc func(ctx context.Context, req *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -// ListRoles will panic if the function has been called, but not mocked -func (m MockRoleService) ListRoles(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { - if m.ListRolesFunc != nil { - return m.ListRolesFunc(ctx, req, opts...) - } - panic("ListRolesFunc was called in test but not mocked") -} - -// ListRoleAssignments will panic if the function has been called, but not mocked -func (m MockRoleService) ListRoleAssignments(ctx context.Context, req *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) { - if m.ListRoleAssignmentsFunc != nil { - return m.ListRoleAssignmentsFunc(ctx, req, opts...) - } - panic("ListRoleAssignmentsFunc was called in test but not mocked") -} - -// AssignRoleToUser will panic if the function has been called, but not mocked -func (m MockRoleService) AssignRoleToUser(ctx context.Context, req *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) { - if m.AssignRoleToUserFunc != nil { - return m.AssignRoleToUserFunc(ctx, req, opts...) - } - panic("AssignRoleToUserFunc was called in test but not mocked") -} - -// RemoveRoleFromUser will panic if the function has been called, but not mocked -func (m MockRoleService) RemoveRoleFromUser(ctx context.Context, req *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - if m.RemoveRoleFromUserFunc != nil { - return m.RemoveRoleFromUserFunc(ctx, req, opts...) - } - panic("RemoveRoleFromUserFunc was called in test but not mocked") -} - -// MockPermissionService will panic if the function has been called, but not mocked -type MockPermissionService struct { - ListPermissionsByResourceFunc func(ctx context.Context, req *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) - GetPermissionByIDFunc func(ctx context.Context, req *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) -} - -// ListPermissionsByResource will panic if the function has been called, but not mocked -func (m MockPermissionService) ListPermissionsByResource(ctx context.Context, req *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) { - if m.ListPermissionsByResourceFunc != nil { - return m.ListPermissionsByResourceFunc(ctx, req, opts...) - } - panic("ListPermissionsByResourceFunc was called in test but not mocked") -} - -// GetPermissionByID will panic if the function has been called, but not mocked -func (m MockPermissionService) GetPermissionByID(ctx context.Context, req *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) { - if m.GetPermissionByIDFunc != nil { - return m.GetPermissionByIDFunc(ctx, req, opts...) - } - panic("GetPermissionByIDFunc was called in test but not mocked") -} diff --git a/settings/pkg/proto/v0/settings.pb.go b/settings/pkg/proto/v0/settings.pb.go deleted file mode 100644 index 66f93c7fcc0..00000000000 --- a/settings/pkg/proto/v0/settings.pb.go +++ /dev/null @@ -1,3901 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 -// source: proto/v0/settings.proto - -package proto - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - 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) -) - -type Resource_Type int32 - -const ( - Resource_TYPE_UNKNOWN Resource_Type = 0 - Resource_TYPE_SYSTEM Resource_Type = 1 - Resource_TYPE_FILE Resource_Type = 2 - Resource_TYPE_SHARE Resource_Type = 3 - Resource_TYPE_SETTING Resource_Type = 4 - Resource_TYPE_BUNDLE Resource_Type = 5 - Resource_TYPE_USER Resource_Type = 6 - Resource_TYPE_GROUP Resource_Type = 7 -) - -// Enum value maps for Resource_Type. -var ( - Resource_Type_name = map[int32]string{ - 0: "TYPE_UNKNOWN", - 1: "TYPE_SYSTEM", - 2: "TYPE_FILE", - 3: "TYPE_SHARE", - 4: "TYPE_SETTING", - 5: "TYPE_BUNDLE", - 6: "TYPE_USER", - 7: "TYPE_GROUP", - } - Resource_Type_value = map[string]int32{ - "TYPE_UNKNOWN": 0, - "TYPE_SYSTEM": 1, - "TYPE_FILE": 2, - "TYPE_SHARE": 3, - "TYPE_SETTING": 4, - "TYPE_BUNDLE": 5, - "TYPE_USER": 6, - "TYPE_GROUP": 7, - } -) - -func (x Resource_Type) Enum() *Resource_Type { - p := new(Resource_Type) - *p = x - return p -} - -func (x Resource_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Resource_Type) Descriptor() protoreflect.EnumDescriptor { - return file_proto_v0_settings_proto_enumTypes[0].Descriptor() -} - -func (Resource_Type) Type() protoreflect.EnumType { - return &file_proto_v0_settings_proto_enumTypes[0] -} - -func (x Resource_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Resource_Type.Descriptor instead. -func (Resource_Type) EnumDescriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{28, 0} -} - -type Bundle_Type int32 - -const ( - Bundle_TYPE_UNKNOWN Bundle_Type = 0 - Bundle_TYPE_DEFAULT Bundle_Type = 1 - Bundle_TYPE_ROLE Bundle_Type = 2 -) - -// Enum value maps for Bundle_Type. -var ( - Bundle_Type_name = map[int32]string{ - 0: "TYPE_UNKNOWN", - 1: "TYPE_DEFAULT", - 2: "TYPE_ROLE", - } - Bundle_Type_value = map[string]int32{ - "TYPE_UNKNOWN": 0, - "TYPE_DEFAULT": 1, - "TYPE_ROLE": 2, - } -) - -func (x Bundle_Type) Enum() *Bundle_Type { - p := new(Bundle_Type) - *p = x - return p -} - -func (x Bundle_Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Bundle_Type) Descriptor() protoreflect.EnumDescriptor { - return file_proto_v0_settings_proto_enumTypes[1].Descriptor() -} - -func (Bundle_Type) Type() protoreflect.EnumType { - return &file_proto_v0_settings_proto_enumTypes[1] -} - -func (x Bundle_Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Bundle_Type.Descriptor instead. -func (Bundle_Type) EnumDescriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{29, 0} -} - -type Permission_Operation int32 - -const ( - Permission_OPERATION_UNKNOWN Permission_Operation = 0 - Permission_OPERATION_CREATE Permission_Operation = 1 - Permission_OPERATION_READ Permission_Operation = 2 - Permission_OPERATION_UPDATE Permission_Operation = 3 - Permission_OPERATION_DELETE Permission_Operation = 4 - Permission_OPERATION_WRITE Permission_Operation = 5 // WRITE is a combination of CREATE and UPDATE - Permission_OPERATION_READWRITE Permission_Operation = 6 // READWRITE is a combination of READ and WRITE -) - -// Enum value maps for Permission_Operation. -var ( - Permission_Operation_name = map[int32]string{ - 0: "OPERATION_UNKNOWN", - 1: "OPERATION_CREATE", - 2: "OPERATION_READ", - 3: "OPERATION_UPDATE", - 4: "OPERATION_DELETE", - 5: "OPERATION_WRITE", - 6: "OPERATION_READWRITE", - } - Permission_Operation_value = map[string]int32{ - "OPERATION_UNKNOWN": 0, - "OPERATION_CREATE": 1, - "OPERATION_READ": 2, - "OPERATION_UPDATE": 3, - "OPERATION_DELETE": 4, - "OPERATION_WRITE": 5, - "OPERATION_READWRITE": 6, - } -) - -func (x Permission_Operation) Enum() *Permission_Operation { - p := new(Permission_Operation) - *p = x - return p -} - -func (x Permission_Operation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Permission_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_proto_v0_settings_proto_enumTypes[2].Descriptor() -} - -func (Permission_Operation) Type() protoreflect.EnumType { - return &file_proto_v0_settings_proto_enumTypes[2] -} - -func (x Permission_Operation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Permission_Operation.Descriptor instead. -func (Permission_Operation) EnumDescriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{37, 0} -} - -type Permission_Constraint int32 - -const ( - Permission_CONSTRAINT_UNKNOWN Permission_Constraint = 0 - Permission_CONSTRAINT_OWN Permission_Constraint = 1 - Permission_CONSTRAINT_SHARED Permission_Constraint = 2 - Permission_CONSTRAINT_ALL Permission_Constraint = 3 -) - -// Enum value maps for Permission_Constraint. -var ( - Permission_Constraint_name = map[int32]string{ - 0: "CONSTRAINT_UNKNOWN", - 1: "CONSTRAINT_OWN", - 2: "CONSTRAINT_SHARED", - 3: "CONSTRAINT_ALL", - } - Permission_Constraint_value = map[string]int32{ - "CONSTRAINT_UNKNOWN": 0, - "CONSTRAINT_OWN": 1, - "CONSTRAINT_SHARED": 2, - "CONSTRAINT_ALL": 3, - } -) - -func (x Permission_Constraint) Enum() *Permission_Constraint { - p := new(Permission_Constraint) - *p = x - return p -} - -func (x Permission_Constraint) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Permission_Constraint) Descriptor() protoreflect.EnumDescriptor { - return file_proto_v0_settings_proto_enumTypes[3].Descriptor() -} - -func (Permission_Constraint) Type() protoreflect.EnumType { - return &file_proto_v0_settings_proto_enumTypes[3] -} - -func (x Permission_Constraint) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Permission_Constraint.Descriptor instead. -func (Permission_Constraint) EnumDescriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{37, 1} -} - -// --- -// requests and responses for settings bundles -// --- -type SaveBundleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` -} - -func (x *SaveBundleRequest) Reset() { - *x = SaveBundleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveBundleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveBundleRequest) ProtoMessage() {} - -func (x *SaveBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 SaveBundleRequest.ProtoReflect.Descriptor instead. -func (*SaveBundleRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{0} -} - -func (x *SaveBundleRequest) GetBundle() *Bundle { - if x != nil { - return x.Bundle - } - return nil -} - -type SaveBundleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` -} - -func (x *SaveBundleResponse) Reset() { - *x = SaveBundleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveBundleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveBundleResponse) ProtoMessage() {} - -func (x *SaveBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 SaveBundleResponse.ProtoReflect.Descriptor instead. -func (*SaveBundleResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{1} -} - -func (x *SaveBundleResponse) GetBundle() *Bundle { - if x != nil { - return x.Bundle - } - return nil -} - -type GetBundleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` -} - -func (x *GetBundleRequest) Reset() { - *x = GetBundleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBundleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBundleRequest) ProtoMessage() {} - -func (x *GetBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 GetBundleRequest.ProtoReflect.Descriptor instead. -func (*GetBundleRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{2} -} - -func (x *GetBundleRequest) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -type GetBundleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` -} - -func (x *GetBundleResponse) Reset() { - *x = GetBundleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBundleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBundleResponse) ProtoMessage() {} - -func (x *GetBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 GetBundleResponse.ProtoReflect.Descriptor instead. -func (*GetBundleResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{3} -} - -func (x *GetBundleResponse) GetBundle() *Bundle { - if x != nil { - return x.Bundle - } - return nil -} - -type ListBundlesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleIds []string `protobuf:"bytes,1,rep,name=bundle_ids,json=bundleIds,proto3" json:"bundle_ids,omitempty"` -} - -func (x *ListBundlesRequest) Reset() { - *x = ListBundlesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListBundlesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListBundlesRequest) ProtoMessage() {} - -func (x *ListBundlesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 ListBundlesRequest.ProtoReflect.Descriptor instead. -func (*ListBundlesRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{4} -} - -func (x *ListBundlesRequest) GetBundleIds() []string { - if x != nil { - return x.BundleIds - } - return nil -} - -type ListBundlesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bundles []*Bundle `protobuf:"bytes,1,rep,name=bundles,proto3" json:"bundles,omitempty"` -} - -func (x *ListBundlesResponse) Reset() { - *x = ListBundlesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListBundlesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListBundlesResponse) ProtoMessage() {} - -func (x *ListBundlesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 ListBundlesResponse.ProtoReflect.Descriptor instead. -func (*ListBundlesResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{5} -} - -func (x *ListBundlesResponse) GetBundles() []*Bundle { - if x != nil { - return x.Bundles - } - return nil -} - -type AddSettingToBundleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - Setting *Setting `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"` -} - -func (x *AddSettingToBundleRequest) Reset() { - *x = AddSettingToBundleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddSettingToBundleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddSettingToBundleRequest) ProtoMessage() {} - -func (x *AddSettingToBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 AddSettingToBundleRequest.ProtoReflect.Descriptor instead. -func (*AddSettingToBundleRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{6} -} - -func (x *AddSettingToBundleRequest) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *AddSettingToBundleRequest) GetSetting() *Setting { - if x != nil { - return x.Setting - } - return nil -} - -type AddSettingToBundleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Setting *Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"` -} - -func (x *AddSettingToBundleResponse) Reset() { - *x = AddSettingToBundleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddSettingToBundleResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddSettingToBundleResponse) ProtoMessage() {} - -func (x *AddSettingToBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 AddSettingToBundleResponse.ProtoReflect.Descriptor instead. -func (*AddSettingToBundleResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{7} -} - -func (x *AddSettingToBundleResponse) GetSetting() *Setting { - if x != nil { - return x.Setting - } - return nil -} - -type RemoveSettingFromBundleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - SettingId string `protobuf:"bytes,2,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` -} - -func (x *RemoveSettingFromBundleRequest) Reset() { - *x = RemoveSettingFromBundleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveSettingFromBundleRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveSettingFromBundleRequest) ProtoMessage() {} - -func (x *RemoveSettingFromBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 RemoveSettingFromBundleRequest.ProtoReflect.Descriptor instead. -func (*RemoveSettingFromBundleRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{8} -} - -func (x *RemoveSettingFromBundleRequest) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *RemoveSettingFromBundleRequest) GetSettingId() string { - if x != nil { - return x.SettingId - } - return "" -} - -type SaveValueRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *SaveValueRequest) Reset() { - *x = SaveValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveValueRequest) ProtoMessage() {} - -func (x *SaveValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 SaveValueRequest.ProtoReflect.Descriptor instead. -func (*SaveValueRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{9} -} - -func (x *SaveValueRequest) GetValue() *Value { - if x != nil { - return x.Value - } - return nil -} - -type SaveValueResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *SaveValueResponse) Reset() { - *x = SaveValueResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveValueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveValueResponse) ProtoMessage() {} - -func (x *SaveValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 SaveValueResponse.ProtoReflect.Descriptor instead. -func (*SaveValueResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{10} -} - -func (x *SaveValueResponse) GetValue() *ValueWithIdentifier { - if x != nil { - return x.Value - } - return nil -} - -type GetValueRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetValueRequest) Reset() { - *x = GetValueRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValueRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValueRequest) ProtoMessage() {} - -func (x *GetValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 GetValueRequest.ProtoReflect.Descriptor instead. -func (*GetValueRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{11} -} - -func (x *GetValueRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetValueResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *GetValueResponse) Reset() { - *x = GetValueResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValueResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValueResponse) ProtoMessage() {} - -func (x *GetValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 GetValueResponse.ProtoReflect.Descriptor instead. -func (*GetValueResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{12} -} - -func (x *GetValueResponse) GetValue() *ValueWithIdentifier { - if x != nil { - return x.Value - } - return nil -} - -type ListValuesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - AccountUuid string `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` -} - -func (x *ListValuesRequest) Reset() { - *x = ListValuesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListValuesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListValuesRequest) ProtoMessage() {} - -func (x *ListValuesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_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 ListValuesRequest.ProtoReflect.Descriptor instead. -func (*ListValuesRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{13} -} - -func (x *ListValuesRequest) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *ListValuesRequest) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -type ListValuesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values []*ValueWithIdentifier `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` -} - -func (x *ListValuesResponse) Reset() { - *x = ListValuesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListValuesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListValuesResponse) ProtoMessage() {} - -func (x *ListValuesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[14] - 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 ListValuesResponse.ProtoReflect.Descriptor instead. -func (*ListValuesResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{14} -} - -func (x *ListValuesResponse) GetValues() []*ValueWithIdentifier { - if x != nil { - return x.Values - } - return nil -} - -type GetValueByUniqueIdentifiersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` - SettingId string `protobuf:"bytes,2,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` -} - -func (x *GetValueByUniqueIdentifiersRequest) Reset() { - *x = GetValueByUniqueIdentifiersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValueByUniqueIdentifiersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValueByUniqueIdentifiersRequest) ProtoMessage() {} - -func (x *GetValueByUniqueIdentifiersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[15] - 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 GetValueByUniqueIdentifiersRequest.ProtoReflect.Descriptor instead. -func (*GetValueByUniqueIdentifiersRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{15} -} - -func (x *GetValueByUniqueIdentifiersRequest) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -func (x *GetValueByUniqueIdentifiersRequest) GetSettingId() string { - if x != nil { - return x.SettingId - } - return "" -} - -type ValueWithIdentifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identifier *Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *ValueWithIdentifier) Reset() { - *x = ValueWithIdentifier{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValueWithIdentifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValueWithIdentifier) ProtoMessage() {} - -func (x *ValueWithIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[16] - 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 ValueWithIdentifier.ProtoReflect.Descriptor instead. -func (*ValueWithIdentifier) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{16} -} - -func (x *ValueWithIdentifier) GetIdentifier() *Identifier { - if x != nil { - return x.Identifier - } - return nil -} - -func (x *ValueWithIdentifier) GetValue() *Value { - if x != nil { - return x.Value - } - return nil -} - -type Identifier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Extension string `protobuf:"bytes,1,opt,name=extension,proto3" json:"extension,omitempty"` - Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"` - Setting string `protobuf:"bytes,3,opt,name=setting,proto3" json:"setting,omitempty"` -} - -func (x *Identifier) Reset() { - *x = Identifier{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identifier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identifier) ProtoMessage() {} - -func (x *Identifier) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[17] - 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 Identifier.ProtoReflect.Descriptor instead. -func (*Identifier) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{17} -} - -func (x *Identifier) GetExtension() string { - if x != nil { - return x.Extension - } - return "" -} - -func (x *Identifier) GetBundle() string { - if x != nil { - return x.Bundle - } - return "" -} - -func (x *Identifier) GetSetting() string { - if x != nil { - return x.Setting - } - return "" -} - -type ListRoleAssignmentsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` -} - -func (x *ListRoleAssignmentsRequest) Reset() { - *x = ListRoleAssignmentsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRoleAssignmentsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRoleAssignmentsRequest) ProtoMessage() {} - -func (x *ListRoleAssignmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[18] - 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 ListRoleAssignmentsRequest.ProtoReflect.Descriptor instead. -func (*ListRoleAssignmentsRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{18} -} - -func (x *ListRoleAssignmentsRequest) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -type ListRoleAssignmentsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assignments []*UserRoleAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` -} - -func (x *ListRoleAssignmentsResponse) Reset() { - *x = ListRoleAssignmentsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRoleAssignmentsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRoleAssignmentsResponse) ProtoMessage() {} - -func (x *ListRoleAssignmentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[19] - 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 ListRoleAssignmentsResponse.ProtoReflect.Descriptor instead. -func (*ListRoleAssignmentsResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{19} -} - -func (x *ListRoleAssignmentsResponse) GetAssignments() []*UserRoleAssignment { - if x != nil { - return x.Assignments - } - return nil -} - -type AssignRoleToUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AccountUuid string `protobuf:"bytes,1,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` - // the role_id is a bundle_id internally - RoleId string `protobuf:"bytes,2,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` -} - -func (x *AssignRoleToUserRequest) Reset() { - *x = AssignRoleToUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssignRoleToUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssignRoleToUserRequest) ProtoMessage() {} - -func (x *AssignRoleToUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[20] - 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 AssignRoleToUserRequest.ProtoReflect.Descriptor instead. -func (*AssignRoleToUserRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{20} -} - -func (x *AssignRoleToUserRequest) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -func (x *AssignRoleToUserRequest) GetRoleId() string { - if x != nil { - return x.RoleId - } - return "" -} - -type AssignRoleToUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assignment *UserRoleAssignment `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"` -} - -func (x *AssignRoleToUserResponse) Reset() { - *x = AssignRoleToUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssignRoleToUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssignRoleToUserResponse) ProtoMessage() {} - -func (x *AssignRoleToUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[21] - 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 AssignRoleToUserResponse.ProtoReflect.Descriptor instead. -func (*AssignRoleToUserResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{21} -} - -func (x *AssignRoleToUserResponse) GetAssignment() *UserRoleAssignment { - if x != nil { - return x.Assignment - } - return nil -} - -type RemoveRoleFromUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *RemoveRoleFromUserRequest) Reset() { - *x = RemoveRoleFromUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveRoleFromUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveRoleFromUserRequest) ProtoMessage() {} - -func (x *RemoveRoleFromUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[22] - 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 RemoveRoleFromUserRequest.ProtoReflect.Descriptor instead. -func (*RemoveRoleFromUserRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{22} -} - -func (x *RemoveRoleFromUserRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type UserRoleAssignment struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is generated upon saving the assignment - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AccountUuid string `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` - // the role_id is a bundle_id internally - RoleId string `protobuf:"bytes,3,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` -} - -func (x *UserRoleAssignment) Reset() { - *x = UserRoleAssignment{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRoleAssignment) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRoleAssignment) ProtoMessage() {} - -func (x *UserRoleAssignment) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[23] - 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 UserRoleAssignment.ProtoReflect.Descriptor instead. -func (*UserRoleAssignment) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{23} -} - -func (x *UserRoleAssignment) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UserRoleAssignment) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -func (x *UserRoleAssignment) GetRoleId() string { - if x != nil { - return x.RoleId - } - return "" -} - -type ListPermissionsByResourceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *ListPermissionsByResourceRequest) Reset() { - *x = ListPermissionsByResourceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPermissionsByResourceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPermissionsByResourceRequest) ProtoMessage() {} - -func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[24] - 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 ListPermissionsByResourceRequest.ProtoReflect.Descriptor instead. -func (*ListPermissionsByResourceRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{24} -} - -func (x *ListPermissionsByResourceRequest) GetResource() *Resource { - if x != nil { - return x.Resource - } - return nil -} - -type ListPermissionsByResourceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` -} - -func (x *ListPermissionsByResourceResponse) Reset() { - *x = ListPermissionsByResourceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListPermissionsByResourceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListPermissionsByResourceResponse) ProtoMessage() {} - -func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[25] - 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 ListPermissionsByResourceResponse.ProtoReflect.Descriptor instead. -func (*ListPermissionsByResourceResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{25} -} - -func (x *ListPermissionsByResourceResponse) GetPermissions() []*Permission { - if x != nil { - return x.Permissions - } - return nil -} - -type GetPermissionByIDRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PermissionId string `protobuf:"bytes,1,opt,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"` -} - -func (x *GetPermissionByIDRequest) Reset() { - *x = GetPermissionByIDRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPermissionByIDRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPermissionByIDRequest) ProtoMessage() {} - -func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[26] - 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 GetPermissionByIDRequest.ProtoReflect.Descriptor instead. -func (*GetPermissionByIDRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{26} -} - -func (x *GetPermissionByIDRequest) GetPermissionId() string { - if x != nil { - return x.PermissionId - } - return "" -} - -type GetPermissionByIDResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Permission *Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` -} - -func (x *GetPermissionByIDResponse) Reset() { - *x = GetPermissionByIDResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPermissionByIDResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPermissionByIDResponse) ProtoMessage() {} - -func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[27] - 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 GetPermissionByIDResponse.ProtoReflect.Descriptor instead. -func (*GetPermissionByIDResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{27} -} - -func (x *GetPermissionByIDResponse) GetPermission() *Permission { - if x != nil { - return x.Permission - } - return nil -} - -type Resource struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type Resource_Type `protobuf:"varint,1,opt,name=type,proto3,enum=com.owncloud.ocis.settings.v0.Resource_Type" json:"type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *Resource) Reset() { - *x = Resource{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Resource) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Resource) ProtoMessage() {} - -func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[28] - 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 Resource.ProtoReflect.Descriptor instead. -func (*Resource) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{28} -} - -func (x *Resource) GetType() Resource_Type { - if x != nil { - return x.Type - } - return Resource_TYPE_UNKNOWN -} - -func (x *Resource) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type Bundle struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=com.owncloud.ocis.settings.v0.Bundle_Type" json:"type,omitempty"` - Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"` - DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Settings []*Setting `protobuf:"bytes,6,rep,name=settings,proto3" json:"settings,omitempty"` - Resource *Resource `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *Bundle) Reset() { - *x = Bundle{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bundle) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bundle) ProtoMessage() {} - -func (x *Bundle) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[29] - 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 Bundle.ProtoReflect.Descriptor instead. -func (*Bundle) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{29} -} - -func (x *Bundle) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Bundle) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Bundle) GetType() Bundle_Type { - if x != nil { - return x.Type - } - return Bundle_TYPE_UNKNOWN -} - -func (x *Bundle) GetExtension() string { - if x != nil { - return x.Extension - } - return "" -} - -func (x *Bundle) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Bundle) GetSettings() []*Setting { - if x != nil { - return x.Settings - } - return nil -} - -func (x *Bundle) GetResource() *Resource { - if x != nil { - return x.Resource - } - return nil -} - -type Setting struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // Types that are assignable to Value: - // *Setting_IntValue - // *Setting_StringValue - // *Setting_BoolValue - // *Setting_SingleChoiceValue - // *Setting_MultiChoiceValue - // *Setting_PermissionValue - Value isSetting_Value `protobuf_oneof:"value"` - Resource *Resource `protobuf:"bytes,11,opt,name=resource,proto3" json:"resource,omitempty"` -} - -func (x *Setting) Reset() { - *x = Setting{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Setting) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Setting) ProtoMessage() {} - -func (x *Setting) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[30] - 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 Setting.ProtoReflect.Descriptor instead. -func (*Setting) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{30} -} - -func (x *Setting) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Setting) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Setting) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Setting) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (m *Setting) GetValue() isSetting_Value { - if m != nil { - return m.Value - } - return nil -} - -func (x *Setting) GetIntValue() *Int { - if x, ok := x.GetValue().(*Setting_IntValue); ok { - return x.IntValue - } - return nil -} - -func (x *Setting) GetStringValue() *String { - if x, ok := x.GetValue().(*Setting_StringValue); ok { - return x.StringValue - } - return nil -} - -func (x *Setting) GetBoolValue() *Bool { - if x, ok := x.GetValue().(*Setting_BoolValue); ok { - return x.BoolValue - } - return nil -} - -func (x *Setting) GetSingleChoiceValue() *SingleChoiceList { - if x, ok := x.GetValue().(*Setting_SingleChoiceValue); ok { - return x.SingleChoiceValue - } - return nil -} - -func (x *Setting) GetMultiChoiceValue() *MultiChoiceList { - if x, ok := x.GetValue().(*Setting_MultiChoiceValue); ok { - return x.MultiChoiceValue - } - return nil -} - -func (x *Setting) GetPermissionValue() *Permission { - if x, ok := x.GetValue().(*Setting_PermissionValue); ok { - return x.PermissionValue - } - return nil -} - -func (x *Setting) GetResource() *Resource { - if x != nil { - return x.Resource - } - return nil -} - -type isSetting_Value interface { - isSetting_Value() -} - -type Setting_IntValue struct { - IntValue *Int `protobuf:"bytes,5,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type Setting_StringValue struct { - StringValue *String `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type Setting_BoolValue struct { - BoolValue *Bool `protobuf:"bytes,7,opt,name=bool_value,json=boolValue,proto3,oneof"` -} - -type Setting_SingleChoiceValue struct { - SingleChoiceValue *SingleChoiceList `protobuf:"bytes,8,opt,name=single_choice_value,json=singleChoiceValue,proto3,oneof"` -} - -type Setting_MultiChoiceValue struct { - MultiChoiceValue *MultiChoiceList `protobuf:"bytes,9,opt,name=multi_choice_value,json=multiChoiceValue,proto3,oneof"` -} - -type Setting_PermissionValue struct { - PermissionValue *Permission `protobuf:"bytes,10,opt,name=permission_value,json=permissionValue,proto3,oneof"` -} - -func (*Setting_IntValue) isSetting_Value() {} - -func (*Setting_StringValue) isSetting_Value() {} - -func (*Setting_BoolValue) isSetting_Value() {} - -func (*Setting_SingleChoiceValue) isSetting_Value() {} - -func (*Setting_MultiChoiceValue) isSetting_Value() {} - -func (*Setting_PermissionValue) isSetting_Value() {} - -type Int struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Default int64 `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` - Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty"` - Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` - Step int64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` - Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` -} - -func (x *Int) Reset() { - *x = Int{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int) ProtoMessage() {} - -func (x *Int) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[31] - 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 Int.ProtoReflect.Descriptor instead. -func (*Int) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{31} -} - -func (x *Int) GetDefault() int64 { - if x != nil { - return x.Default - } - return 0 -} - -func (x *Int) GetMin() int64 { - if x != nil { - return x.Min - } - return 0 -} - -func (x *Int) GetMax() int64 { - if x != nil { - return x.Max - } - return 0 -} - -func (x *Int) GetStep() int64 { - if x != nil { - return x.Step - } - return 0 -} - -func (x *Int) GetPlaceholder() string { - if x != nil { - return x.Placeholder - } - return "" -} - -type String struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"` - Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` - MinLength int32 `protobuf:"varint,3,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` - MaxLength int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` - Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` -} - -func (x *String) Reset() { - *x = String{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *String) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*String) ProtoMessage() {} - -func (x *String) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[32] - 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 String.ProtoReflect.Descriptor instead. -func (*String) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{32} -} - -func (x *String) GetDefault() string { - if x != nil { - return x.Default - } - return "" -} - -func (x *String) GetRequired() bool { - if x != nil { - return x.Required - } - return false -} - -func (x *String) GetMinLength() int32 { - if x != nil { - return x.MinLength - } - return 0 -} - -func (x *String) GetMaxLength() int32 { - if x != nil { - return x.MaxLength - } - return 0 -} - -func (x *String) GetPlaceholder() string { - if x != nil { - return x.Placeholder - } - return "" -} - -type Bool struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` -} - -func (x *Bool) Reset() { - *x = Bool{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bool) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bool) ProtoMessage() {} - -func (x *Bool) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[33] - 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 Bool.ProtoReflect.Descriptor instead. -func (*Bool) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{33} -} - -func (x *Bool) GetDefault() bool { - if x != nil { - return x.Default - } - return false -} - -func (x *Bool) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -type SingleChoiceList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *SingleChoiceList) Reset() { - *x = SingleChoiceList{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleChoiceList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleChoiceList) ProtoMessage() {} - -func (x *SingleChoiceList) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[34] - 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 SingleChoiceList.ProtoReflect.Descriptor instead. -func (*SingleChoiceList) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{34} -} - -func (x *SingleChoiceList) GetOptions() []*ListOption { - if x != nil { - return x.Options - } - return nil -} - -type MultiChoiceList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` -} - -func (x *MultiChoiceList) Reset() { - *x = MultiChoiceList{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MultiChoiceList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiChoiceList) ProtoMessage() {} - -func (x *MultiChoiceList) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[35] - 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 MultiChoiceList.ProtoReflect.Descriptor instead. -func (*MultiChoiceList) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{35} -} - -func (x *MultiChoiceList) GetOptions() []*ListOption { - if x != nil { - return x.Options - } - return nil -} - -type ListOption struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *ListOptionValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty"` - DisplayValue string `protobuf:"bytes,3,opt,name=display_value,json=displayValue,proto3" json:"display_value,omitempty"` -} - -func (x *ListOption) Reset() { - *x = ListOption{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListOption) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOption) ProtoMessage() {} - -func (x *ListOption) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[36] - 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 ListOption.ProtoReflect.Descriptor instead. -func (*ListOption) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{36} -} - -func (x *ListOption) GetValue() *ListOptionValue { - if x != nil { - return x.Value - } - return nil -} - -func (x *ListOption) GetDefault() bool { - if x != nil { - return x.Default - } - return false -} - -func (x *ListOption) GetDisplayValue() string { - if x != nil { - return x.DisplayValue - } - return "" -} - -type Permission struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=com.owncloud.ocis.settings.v0.Permission_Operation" json:"operation,omitempty"` - Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=com.owncloud.ocis.settings.v0.Permission_Constraint" json:"constraint,omitempty"` -} - -func (x *Permission) Reset() { - *x = Permission{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Permission) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Permission) ProtoMessage() {} - -func (x *Permission) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[37] - 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 Permission.ProtoReflect.Descriptor instead. -func (*Permission) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{37} -} - -func (x *Permission) GetOperation() Permission_Operation { - if x != nil { - return x.Operation - } - return Permission_OPERATION_UNKNOWN -} - -func (x *Permission) GetConstraint() Permission_Constraint { - if x != nil { - return x.Constraint - } - return Permission_CONSTRAINT_UNKNOWN -} - -type Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // id is the id of the Value. It is generated on saving it. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - // setting_id is the id of the setting from within its bundle. - SettingId string `protobuf:"bytes,3,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` - AccountUuid string `protobuf:"bytes,4,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` - Resource *Resource `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` - // Types that are assignable to Value: - // *Value_BoolValue - // *Value_IntValue - // *Value_StringValue - // *Value_ListValue - Value isValue_Value `protobuf_oneof:"value"` -} - -func (x *Value) Reset() { - *x = Value{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Value) ProtoMessage() {} - -func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[38] - 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 Value.ProtoReflect.Descriptor instead. -func (*Value) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{38} -} - -func (x *Value) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Value) GetBundleId() string { - if x != nil { - return x.BundleId - } - return "" -} - -func (x *Value) GetSettingId() string { - if x != nil { - return x.SettingId - } - return "" -} - -func (x *Value) GetAccountUuid() string { - if x != nil { - return x.AccountUuid - } - return "" -} - -func (x *Value) GetResource() *Resource { - if x != nil { - return x.Resource - } - return nil -} - -func (m *Value) GetValue() isValue_Value { - if m != nil { - return m.Value - } - return nil -} - -func (x *Value) GetBoolValue() bool { - if x, ok := x.GetValue().(*Value_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (x *Value) GetIntValue() int64 { - if x, ok := x.GetValue().(*Value_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (x *Value) GetStringValue() string { - if x, ok := x.GetValue().(*Value_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *Value) GetListValue() *ListValue { - if x, ok := x.GetValue().(*Value_ListValue); ok { - return x.ListValue - } - return nil -} - -type isValue_Value interface { - isValue_Value() -} - -type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"` -} - -type Value_IntValue struct { - IntValue int64 `protobuf:"varint,7,opt,name=int_value,json=intValue,proto3,oneof"` -} - -type Value_StringValue struct { - StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,9,opt,name=list_value,json=listValue,proto3,oneof"` -} - -func (*Value_BoolValue) isValue_Value() {} - -func (*Value_IntValue) isValue_Value() {} - -func (*Value_StringValue) isValue_Value() {} - -func (*Value_ListValue) isValue_Value() {} - -type ListValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Values []*ListOptionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` -} - -func (x *ListValue) Reset() { - *x = ListValue{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListValue) ProtoMessage() {} - -func (x *ListValue) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[39] - 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 ListValue.ProtoReflect.Descriptor instead. -func (*ListValue) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{39} -} - -func (x *ListValue) GetValues() []*ListOptionValue { - if x != nil { - return x.Values - } - return nil -} - -type ListOptionValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Option: - // *ListOptionValue_StringValue - // *ListOptionValue_IntValue - Option isListOptionValue_Option `protobuf_oneof:"option"` -} - -func (x *ListOptionValue) Reset() { - *x = ListOptionValue{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_settings_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListOptionValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOptionValue) ProtoMessage() {} - -func (x *ListOptionValue) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_settings_proto_msgTypes[40] - 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 ListOptionValue.ProtoReflect.Descriptor instead. -func (*ListOptionValue) Descriptor() ([]byte, []int) { - return file_proto_v0_settings_proto_rawDescGZIP(), []int{40} -} - -func (m *ListOptionValue) GetOption() isListOptionValue_Option { - if m != nil { - return m.Option - } - return nil -} - -func (x *ListOptionValue) GetStringValue() string { - if x, ok := x.GetOption().(*ListOptionValue_StringValue); ok { - return x.StringValue - } - return "" -} - -func (x *ListOptionValue) GetIntValue() int64 { - if x, ok := x.GetOption().(*ListOptionValue_IntValue); ok { - return x.IntValue - } - return 0 -} - -type isListOptionValue_Option interface { - isListOptionValue_Option() -} - -type ListOptionValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` -} - -type ListOptionValue_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` -} - -func (*ListOptionValue_StringValue) isListOptionValue_Option() {} - -func (*ListOptionValue_IntValue) isListOptionValue_Option() {} - -var File_proto_v0_settings_proto protoreflect.FileDescriptor - -var file_proto_v0_settings_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, 0x22, 0x52, 0x0a, 0x11, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, - 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x53, 0x61, 0x76, 0x65, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, - 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2f, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x52, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x22, 0x33, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x62, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x22, 0x56, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, - 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x7a, - 0x0a, 0x19, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5e, 0x0a, 0x1a, 0x41, 0x64, - 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0x0a, 0x1e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, - 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5d, 0x0a, 0x11, 0x53, 0x61, 0x76, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5c, 0x0a, 0x10, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x60, 0x0a, - 0x12, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, - 0x66, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, - 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x22, 0x9c, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x49, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5c, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x22, 0x3f, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x55, 0x75, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, - 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x61, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x17, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, - 0x22, 0x6d, 0x0a, 0x18, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0a, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x2b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x60, 0x0a, 0x12, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x67, - 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x70, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0b, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x66, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0xe9, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x40, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x01, 0x12, 0x0d, 0x0a, - 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, - 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x55, 0x4e, 0x44, 0x4c, 0x45, 0x10, 0x05, 0x12, - 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x06, 0x12, 0x0e, - 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x07, 0x22, 0xf1, - 0x02, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x64, - 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, - 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, - 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, - 0x10, 0x02, 0x22, 0xb0, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4a, 0x0a, 0x0c, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, - 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x61, 0x0a, 0x13, - 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, - 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x5e, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4d, 0x75, 0x6c, 0x74, - 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x10, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x56, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, - 0x65, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x20, - 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, - 0x22, 0x9e, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, - 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, - 0x72, 0x22, 0x36, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x57, 0x0a, 0x10, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x56, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc3, - 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x54, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, - 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, - 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, - 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4f, - 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, - 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x57, - 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x06, 0x22, - 0x63, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, - 0x12, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, - 0x49, 0x4e, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, - 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x41, - 0x4c, 0x4c, 0x10, 0x03, 0x22, 0xf4, 0x02, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, - 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x43, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x09, 0x4c, - 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x22, 0x5f, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0xca, 0x06, 0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, - 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, - 0x12, 0x96, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2f, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, - 0x6c, 0x65, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xba, 0x01, 0x0a, 0x12, 0x41, - 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa4, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, - 0x64, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x32, 0xad, - 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x97, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, - 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, - 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x93, 0x01, 0x0a, 0x08, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, - 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, - 0x9a, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x30, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xcf, 0x01, 0x0a, - 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, - 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x41, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x32, 0xb3, - 0x05, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9a, - 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xba, 0x01, 0x0a, 0x13, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb0, 0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, - 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x12, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, - 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x3a, 0x01, 0x2a, 0x32, 0xaa, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd8, 0x01, 0x0a, 0x19, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb9, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x12, 0x37, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x64, 0x3a, 0x01, - 0x2a, 0x42, 0xda, 0x02, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x76, 0x30, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, - 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, - 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, - 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, - 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, - 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, - 0x32, 0x05, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, - 0x3d, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, - 0x75, 0x61, 0x6c, 0x12, 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_v0_settings_proto_rawDescOnce sync.Once - file_proto_v0_settings_proto_rawDescData = file_proto_v0_settings_proto_rawDesc -) - -func file_proto_v0_settings_proto_rawDescGZIP() []byte { - file_proto_v0_settings_proto_rawDescOnce.Do(func() { - file_proto_v0_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_v0_settings_proto_rawDescData) - }) - return file_proto_v0_settings_proto_rawDescData -} - -var file_proto_v0_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_proto_v0_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 41) -var file_proto_v0_settings_proto_goTypes = []interface{}{ - (Resource_Type)(0), // 0: com.owncloud.ocis.settings.v0.Resource.Type - (Bundle_Type)(0), // 1: com.owncloud.ocis.settings.v0.Bundle.Type - (Permission_Operation)(0), // 2: com.owncloud.ocis.settings.v0.Permission.Operation - (Permission_Constraint)(0), // 3: com.owncloud.ocis.settings.v0.Permission.Constraint - (*SaveBundleRequest)(nil), // 4: com.owncloud.ocis.settings.v0.SaveBundleRequest - (*SaveBundleResponse)(nil), // 5: com.owncloud.ocis.settings.v0.SaveBundleResponse - (*GetBundleRequest)(nil), // 6: com.owncloud.ocis.settings.v0.GetBundleRequest - (*GetBundleResponse)(nil), // 7: com.owncloud.ocis.settings.v0.GetBundleResponse - (*ListBundlesRequest)(nil), // 8: com.owncloud.ocis.settings.v0.ListBundlesRequest - (*ListBundlesResponse)(nil), // 9: com.owncloud.ocis.settings.v0.ListBundlesResponse - (*AddSettingToBundleRequest)(nil), // 10: com.owncloud.ocis.settings.v0.AddSettingToBundleRequest - (*AddSettingToBundleResponse)(nil), // 11: com.owncloud.ocis.settings.v0.AddSettingToBundleResponse - (*RemoveSettingFromBundleRequest)(nil), // 12: com.owncloud.ocis.settings.v0.RemoveSettingFromBundleRequest - (*SaveValueRequest)(nil), // 13: com.owncloud.ocis.settings.v0.SaveValueRequest - (*SaveValueResponse)(nil), // 14: com.owncloud.ocis.settings.v0.SaveValueResponse - (*GetValueRequest)(nil), // 15: com.owncloud.ocis.settings.v0.GetValueRequest - (*GetValueResponse)(nil), // 16: com.owncloud.ocis.settings.v0.GetValueResponse - (*ListValuesRequest)(nil), // 17: com.owncloud.ocis.settings.v0.ListValuesRequest - (*ListValuesResponse)(nil), // 18: com.owncloud.ocis.settings.v0.ListValuesResponse - (*GetValueByUniqueIdentifiersRequest)(nil), // 19: com.owncloud.ocis.settings.v0.GetValueByUniqueIdentifiersRequest - (*ValueWithIdentifier)(nil), // 20: com.owncloud.ocis.settings.v0.ValueWithIdentifier - (*Identifier)(nil), // 21: com.owncloud.ocis.settings.v0.Identifier - (*ListRoleAssignmentsRequest)(nil), // 22: com.owncloud.ocis.settings.v0.ListRoleAssignmentsRequest - (*ListRoleAssignmentsResponse)(nil), // 23: com.owncloud.ocis.settings.v0.ListRoleAssignmentsResponse - (*AssignRoleToUserRequest)(nil), // 24: com.owncloud.ocis.settings.v0.AssignRoleToUserRequest - (*AssignRoleToUserResponse)(nil), // 25: com.owncloud.ocis.settings.v0.AssignRoleToUserResponse - (*RemoveRoleFromUserRequest)(nil), // 26: com.owncloud.ocis.settings.v0.RemoveRoleFromUserRequest - (*UserRoleAssignment)(nil), // 27: com.owncloud.ocis.settings.v0.UserRoleAssignment - (*ListPermissionsByResourceRequest)(nil), // 28: com.owncloud.ocis.settings.v0.ListPermissionsByResourceRequest - (*ListPermissionsByResourceResponse)(nil), // 29: com.owncloud.ocis.settings.v0.ListPermissionsByResourceResponse - (*GetPermissionByIDRequest)(nil), // 30: com.owncloud.ocis.settings.v0.GetPermissionByIDRequest - (*GetPermissionByIDResponse)(nil), // 31: com.owncloud.ocis.settings.v0.GetPermissionByIDResponse - (*Resource)(nil), // 32: com.owncloud.ocis.settings.v0.Resource - (*Bundle)(nil), // 33: com.owncloud.ocis.settings.v0.Bundle - (*Setting)(nil), // 34: com.owncloud.ocis.settings.v0.Setting - (*Int)(nil), // 35: com.owncloud.ocis.settings.v0.Int - (*String)(nil), // 36: com.owncloud.ocis.settings.v0.String - (*Bool)(nil), // 37: com.owncloud.ocis.settings.v0.Bool - (*SingleChoiceList)(nil), // 38: com.owncloud.ocis.settings.v0.SingleChoiceList - (*MultiChoiceList)(nil), // 39: com.owncloud.ocis.settings.v0.MultiChoiceList - (*ListOption)(nil), // 40: com.owncloud.ocis.settings.v0.ListOption - (*Permission)(nil), // 41: com.owncloud.ocis.settings.v0.Permission - (*Value)(nil), // 42: com.owncloud.ocis.settings.v0.Value - (*ListValue)(nil), // 43: com.owncloud.ocis.settings.v0.ListValue - (*ListOptionValue)(nil), // 44: com.owncloud.ocis.settings.v0.ListOptionValue - (*emptypb.Empty)(nil), // 45: google.protobuf.Empty -} -var file_proto_v0_settings_proto_depIdxs = []int32{ - 33, // 0: com.owncloud.ocis.settings.v0.SaveBundleRequest.bundle:type_name -> com.owncloud.ocis.settings.v0.Bundle - 33, // 1: com.owncloud.ocis.settings.v0.SaveBundleResponse.bundle:type_name -> com.owncloud.ocis.settings.v0.Bundle - 33, // 2: com.owncloud.ocis.settings.v0.GetBundleResponse.bundle:type_name -> com.owncloud.ocis.settings.v0.Bundle - 33, // 3: com.owncloud.ocis.settings.v0.ListBundlesResponse.bundles:type_name -> com.owncloud.ocis.settings.v0.Bundle - 34, // 4: com.owncloud.ocis.settings.v0.AddSettingToBundleRequest.setting:type_name -> com.owncloud.ocis.settings.v0.Setting - 34, // 5: com.owncloud.ocis.settings.v0.AddSettingToBundleResponse.setting:type_name -> com.owncloud.ocis.settings.v0.Setting - 42, // 6: com.owncloud.ocis.settings.v0.SaveValueRequest.value:type_name -> com.owncloud.ocis.settings.v0.Value - 20, // 7: com.owncloud.ocis.settings.v0.SaveValueResponse.value:type_name -> com.owncloud.ocis.settings.v0.ValueWithIdentifier - 20, // 8: com.owncloud.ocis.settings.v0.GetValueResponse.value:type_name -> com.owncloud.ocis.settings.v0.ValueWithIdentifier - 20, // 9: com.owncloud.ocis.settings.v0.ListValuesResponse.values:type_name -> com.owncloud.ocis.settings.v0.ValueWithIdentifier - 21, // 10: com.owncloud.ocis.settings.v0.ValueWithIdentifier.identifier:type_name -> com.owncloud.ocis.settings.v0.Identifier - 42, // 11: com.owncloud.ocis.settings.v0.ValueWithIdentifier.value:type_name -> com.owncloud.ocis.settings.v0.Value - 27, // 12: com.owncloud.ocis.settings.v0.ListRoleAssignmentsResponse.assignments:type_name -> com.owncloud.ocis.settings.v0.UserRoleAssignment - 27, // 13: com.owncloud.ocis.settings.v0.AssignRoleToUserResponse.assignment:type_name -> com.owncloud.ocis.settings.v0.UserRoleAssignment - 32, // 14: com.owncloud.ocis.settings.v0.ListPermissionsByResourceRequest.resource:type_name -> com.owncloud.ocis.settings.v0.Resource - 41, // 15: com.owncloud.ocis.settings.v0.ListPermissionsByResourceResponse.permissions:type_name -> com.owncloud.ocis.settings.v0.Permission - 41, // 16: com.owncloud.ocis.settings.v0.GetPermissionByIDResponse.permission:type_name -> com.owncloud.ocis.settings.v0.Permission - 0, // 17: com.owncloud.ocis.settings.v0.Resource.type:type_name -> com.owncloud.ocis.settings.v0.Resource.Type - 1, // 18: com.owncloud.ocis.settings.v0.Bundle.type:type_name -> com.owncloud.ocis.settings.v0.Bundle.Type - 34, // 19: com.owncloud.ocis.settings.v0.Bundle.settings:type_name -> com.owncloud.ocis.settings.v0.Setting - 32, // 20: com.owncloud.ocis.settings.v0.Bundle.resource:type_name -> com.owncloud.ocis.settings.v0.Resource - 35, // 21: com.owncloud.ocis.settings.v0.Setting.int_value:type_name -> com.owncloud.ocis.settings.v0.Int - 36, // 22: com.owncloud.ocis.settings.v0.Setting.string_value:type_name -> com.owncloud.ocis.settings.v0.String - 37, // 23: com.owncloud.ocis.settings.v0.Setting.bool_value:type_name -> com.owncloud.ocis.settings.v0.Bool - 38, // 24: com.owncloud.ocis.settings.v0.Setting.single_choice_value:type_name -> com.owncloud.ocis.settings.v0.SingleChoiceList - 39, // 25: com.owncloud.ocis.settings.v0.Setting.multi_choice_value:type_name -> com.owncloud.ocis.settings.v0.MultiChoiceList - 41, // 26: com.owncloud.ocis.settings.v0.Setting.permission_value:type_name -> com.owncloud.ocis.settings.v0.Permission - 32, // 27: com.owncloud.ocis.settings.v0.Setting.resource:type_name -> com.owncloud.ocis.settings.v0.Resource - 40, // 28: com.owncloud.ocis.settings.v0.SingleChoiceList.options:type_name -> com.owncloud.ocis.settings.v0.ListOption - 40, // 29: com.owncloud.ocis.settings.v0.MultiChoiceList.options:type_name -> com.owncloud.ocis.settings.v0.ListOption - 44, // 30: com.owncloud.ocis.settings.v0.ListOption.value:type_name -> com.owncloud.ocis.settings.v0.ListOptionValue - 2, // 31: com.owncloud.ocis.settings.v0.Permission.operation:type_name -> com.owncloud.ocis.settings.v0.Permission.Operation - 3, // 32: com.owncloud.ocis.settings.v0.Permission.constraint:type_name -> com.owncloud.ocis.settings.v0.Permission.Constraint - 32, // 33: com.owncloud.ocis.settings.v0.Value.resource:type_name -> com.owncloud.ocis.settings.v0.Resource - 43, // 34: com.owncloud.ocis.settings.v0.Value.list_value:type_name -> com.owncloud.ocis.settings.v0.ListValue - 44, // 35: com.owncloud.ocis.settings.v0.ListValue.values:type_name -> com.owncloud.ocis.settings.v0.ListOptionValue - 4, // 36: com.owncloud.ocis.settings.v0.BundleService.SaveBundle:input_type -> com.owncloud.ocis.settings.v0.SaveBundleRequest - 6, // 37: com.owncloud.ocis.settings.v0.BundleService.GetBundle:input_type -> com.owncloud.ocis.settings.v0.GetBundleRequest - 8, // 38: com.owncloud.ocis.settings.v0.BundleService.ListBundles:input_type -> com.owncloud.ocis.settings.v0.ListBundlesRequest - 10, // 39: com.owncloud.ocis.settings.v0.BundleService.AddSettingToBundle:input_type -> com.owncloud.ocis.settings.v0.AddSettingToBundleRequest - 12, // 40: com.owncloud.ocis.settings.v0.BundleService.RemoveSettingFromBundle:input_type -> com.owncloud.ocis.settings.v0.RemoveSettingFromBundleRequest - 13, // 41: com.owncloud.ocis.settings.v0.ValueService.SaveValue:input_type -> com.owncloud.ocis.settings.v0.SaveValueRequest - 15, // 42: com.owncloud.ocis.settings.v0.ValueService.GetValue:input_type -> com.owncloud.ocis.settings.v0.GetValueRequest - 17, // 43: com.owncloud.ocis.settings.v0.ValueService.ListValues:input_type -> com.owncloud.ocis.settings.v0.ListValuesRequest - 19, // 44: com.owncloud.ocis.settings.v0.ValueService.GetValueByUniqueIdentifiers:input_type -> com.owncloud.ocis.settings.v0.GetValueByUniqueIdentifiersRequest - 8, // 45: com.owncloud.ocis.settings.v0.RoleService.ListRoles:input_type -> com.owncloud.ocis.settings.v0.ListBundlesRequest - 22, // 46: com.owncloud.ocis.settings.v0.RoleService.ListRoleAssignments:input_type -> com.owncloud.ocis.settings.v0.ListRoleAssignmentsRequest - 24, // 47: com.owncloud.ocis.settings.v0.RoleService.AssignRoleToUser:input_type -> com.owncloud.ocis.settings.v0.AssignRoleToUserRequest - 26, // 48: com.owncloud.ocis.settings.v0.RoleService.RemoveRoleFromUser:input_type -> com.owncloud.ocis.settings.v0.RemoveRoleFromUserRequest - 28, // 49: com.owncloud.ocis.settings.v0.PermissionService.ListPermissionsByResource:input_type -> com.owncloud.ocis.settings.v0.ListPermissionsByResourceRequest - 30, // 50: com.owncloud.ocis.settings.v0.PermissionService.GetPermissionByID:input_type -> com.owncloud.ocis.settings.v0.GetPermissionByIDRequest - 5, // 51: com.owncloud.ocis.settings.v0.BundleService.SaveBundle:output_type -> com.owncloud.ocis.settings.v0.SaveBundleResponse - 7, // 52: com.owncloud.ocis.settings.v0.BundleService.GetBundle:output_type -> com.owncloud.ocis.settings.v0.GetBundleResponse - 9, // 53: com.owncloud.ocis.settings.v0.BundleService.ListBundles:output_type -> com.owncloud.ocis.settings.v0.ListBundlesResponse - 11, // 54: com.owncloud.ocis.settings.v0.BundleService.AddSettingToBundle:output_type -> com.owncloud.ocis.settings.v0.AddSettingToBundleResponse - 45, // 55: com.owncloud.ocis.settings.v0.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty - 14, // 56: com.owncloud.ocis.settings.v0.ValueService.SaveValue:output_type -> com.owncloud.ocis.settings.v0.SaveValueResponse - 16, // 57: com.owncloud.ocis.settings.v0.ValueService.GetValue:output_type -> com.owncloud.ocis.settings.v0.GetValueResponse - 18, // 58: com.owncloud.ocis.settings.v0.ValueService.ListValues:output_type -> com.owncloud.ocis.settings.v0.ListValuesResponse - 16, // 59: com.owncloud.ocis.settings.v0.ValueService.GetValueByUniqueIdentifiers:output_type -> com.owncloud.ocis.settings.v0.GetValueResponse - 9, // 60: com.owncloud.ocis.settings.v0.RoleService.ListRoles:output_type -> com.owncloud.ocis.settings.v0.ListBundlesResponse - 23, // 61: com.owncloud.ocis.settings.v0.RoleService.ListRoleAssignments:output_type -> com.owncloud.ocis.settings.v0.ListRoleAssignmentsResponse - 25, // 62: com.owncloud.ocis.settings.v0.RoleService.AssignRoleToUser:output_type -> com.owncloud.ocis.settings.v0.AssignRoleToUserResponse - 45, // 63: com.owncloud.ocis.settings.v0.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty - 29, // 64: com.owncloud.ocis.settings.v0.PermissionService.ListPermissionsByResource:output_type -> com.owncloud.ocis.settings.v0.ListPermissionsByResourceResponse - 31, // 65: com.owncloud.ocis.settings.v0.PermissionService.GetPermissionByID:output_type -> com.owncloud.ocis.settings.v0.GetPermissionByIDResponse - 51, // [51:66] is the sub-list for method output_type - 36, // [36:51] is the sub-list for method input_type - 36, // [36:36] is the sub-list for extension type_name - 36, // [36:36] is the sub-list for extension extendee - 0, // [0:36] is the sub-list for field type_name -} - -func init() { file_proto_v0_settings_proto_init() } -func file_proto_v0_settings_proto_init() { - if File_proto_v0_settings_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_v0_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveBundleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveBundleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBundleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetBundleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBundlesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListBundlesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSettingToBundleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddSettingToBundleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveSettingFromBundleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveValueResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValueRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValueResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListValuesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListValuesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetValueByUniqueIdentifiersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueWithIdentifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identifier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRoleAssignmentsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRoleAssignmentsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssignRoleToUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssignRoleToUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveRoleFromUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRoleAssignment); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPermissionsByResourceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPermissionsByResourceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPermissionByIDRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPermissionByIDResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bundle); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Setting); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*String); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bool); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleChoiceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MultiChoiceList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Permission); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_settings_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOptionValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_proto_v0_settings_proto_msgTypes[30].OneofWrappers = []interface{}{ - (*Setting_IntValue)(nil), - (*Setting_StringValue)(nil), - (*Setting_BoolValue)(nil), - (*Setting_SingleChoiceValue)(nil), - (*Setting_MultiChoiceValue)(nil), - (*Setting_PermissionValue)(nil), - } - file_proto_v0_settings_proto_msgTypes[38].OneofWrappers = []interface{}{ - (*Value_BoolValue)(nil), - (*Value_IntValue)(nil), - (*Value_StringValue)(nil), - (*Value_ListValue)(nil), - } - file_proto_v0_settings_proto_msgTypes[40].OneofWrappers = []interface{}{ - (*ListOptionValue_StringValue)(nil), - (*ListOptionValue_IntValue)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_v0_settings_proto_rawDesc, - NumEnums: 4, - NumMessages: 41, - NumExtensions: 0, - NumServices: 4, - }, - GoTypes: file_proto_v0_settings_proto_goTypes, - DependencyIndexes: file_proto_v0_settings_proto_depIdxs, - EnumInfos: file_proto_v0_settings_proto_enumTypes, - MessageInfos: file_proto_v0_settings_proto_msgTypes, - }.Build() - File_proto_v0_settings_proto = out.File - file_proto_v0_settings_proto_rawDesc = nil - file_proto_v0_settings_proto_goTypes = nil - file_proto_v0_settings_proto_depIdxs = nil -} diff --git a/settings/pkg/proto/v0/settings.pb.micro.go b/settings/pkg/proto/v0/settings.pb.micro.go deleted file mode 100644 index b8fbc79a102..00000000000 --- a/settings/pkg/proto/v0/settings.pb.micro.go +++ /dev/null @@ -1,668 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/v0/settings.proto - -package proto - -import ( - fmt "fmt" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - proto "google.golang.org/protobuf/proto" - emptypb "google.golang.org/protobuf/types/known/emptypb" - math "math" -) - -import ( - context "context" - api "go-micro.dev/v4/api" - client "go-micro.dev/v4/client" - server "go-micro.dev/v4/server" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for BundleService service - -func NewBundleServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "BundleService.SaveBundle", - Path: []string{"/api/v0/settings/bundle-save"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "BundleService.GetBundle", - Path: []string{"/api/v0/settings/bundle-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "BundleService.ListBundles", - Path: []string{"/api/v0/settings/bundles-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "BundleService.AddSettingToBundle", - Path: []string{"/api/v0/settings/bundles-add-setting"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "BundleService.RemoveSettingFromBundle", - Path: []string{"/api/v0/settings/bundles-remove-setting"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for BundleService service - -type BundleService interface { - SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) - GetBundle(ctx context.Context, in *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) - ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) - AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) - RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -type bundleService struct { - c client.Client - name string -} - -func NewBundleService(name string, c client.Client) BundleService { - return &bundleService{ - c: c, - name: name, - } -} - -func (c *bundleService) SaveBundle(ctx context.Context, in *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) { - req := c.c.NewRequest(c.name, "BundleService.SaveBundle", in) - out := new(SaveBundleResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bundleService) GetBundle(ctx context.Context, in *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) { - req := c.c.NewRequest(c.name, "BundleService.GetBundle", in) - out := new(GetBundleResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bundleService) ListBundles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { - req := c.c.NewRequest(c.name, "BundleService.ListBundles", in) - out := new(ListBundlesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bundleService) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) { - req := c.c.NewRequest(c.name, "BundleService.AddSettingToBundle", in) - out := new(AddSettingToBundleResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bundleService) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "BundleService.RemoveSettingFromBundle", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for BundleService service - -type BundleServiceHandler interface { - SaveBundle(context.Context, *SaveBundleRequest, *SaveBundleResponse) error - GetBundle(context.Context, *GetBundleRequest, *GetBundleResponse) error - ListBundles(context.Context, *ListBundlesRequest, *ListBundlesResponse) error - AddSettingToBundle(context.Context, *AddSettingToBundleRequest, *AddSettingToBundleResponse) error - RemoveSettingFromBundle(context.Context, *RemoveSettingFromBundleRequest, *emptypb.Empty) error -} - -func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, opts ...server.HandlerOption) error { - type bundleService interface { - SaveBundle(ctx context.Context, in *SaveBundleRequest, out *SaveBundleResponse) error - GetBundle(ctx context.Context, in *GetBundleRequest, out *GetBundleResponse) error - ListBundles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error - AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, out *AddSettingToBundleResponse) error - RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, out *emptypb.Empty) error - } - type BundleService struct { - bundleService - } - h := &bundleServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "BundleService.SaveBundle", - Path: []string{"/api/v0/settings/bundle-save"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "BundleService.GetBundle", - Path: []string{"/api/v0/settings/bundle-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "BundleService.ListBundles", - Path: []string{"/api/v0/settings/bundles-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "BundleService.AddSettingToBundle", - Path: []string{"/api/v0/settings/bundles-add-setting"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "BundleService.RemoveSettingFromBundle", - Path: []string{"/api/v0/settings/bundles-remove-setting"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&BundleService{h}, opts...)) -} - -type bundleServiceHandler struct { - BundleServiceHandler -} - -func (h *bundleServiceHandler) SaveBundle(ctx context.Context, in *SaveBundleRequest, out *SaveBundleResponse) error { - return h.BundleServiceHandler.SaveBundle(ctx, in, out) -} - -func (h *bundleServiceHandler) GetBundle(ctx context.Context, in *GetBundleRequest, out *GetBundleResponse) error { - return h.BundleServiceHandler.GetBundle(ctx, in, out) -} - -func (h *bundleServiceHandler) ListBundles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error { - return h.BundleServiceHandler.ListBundles(ctx, in, out) -} - -func (h *bundleServiceHandler) AddSettingToBundle(ctx context.Context, in *AddSettingToBundleRequest, out *AddSettingToBundleResponse) error { - return h.BundleServiceHandler.AddSettingToBundle(ctx, in, out) -} - -func (h *bundleServiceHandler) RemoveSettingFromBundle(ctx context.Context, in *RemoveSettingFromBundleRequest, out *emptypb.Empty) error { - return h.BundleServiceHandler.RemoveSettingFromBundle(ctx, in, out) -} - -// Api Endpoints for ValueService service - -func NewValueServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "ValueService.SaveValue", - Path: []string{"/api/v0/settings/values-save"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "ValueService.GetValue", - Path: []string{"/api/v0/settings/values-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "ValueService.ListValues", - Path: []string{"/api/v0/settings/values-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "ValueService.GetValueByUniqueIdentifiers", - Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for ValueService service - -type ValueService interface { - SaveValue(ctx context.Context, in *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) - GetValue(ctx context.Context, in *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) - ListValues(ctx context.Context, in *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) - GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) -} - -type valueService struct { - c client.Client - name string -} - -func NewValueService(name string, c client.Client) ValueService { - return &valueService{ - c: c, - name: name, - } -} - -func (c *valueService) SaveValue(ctx context.Context, in *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) { - req := c.c.NewRequest(c.name, "ValueService.SaveValue", in) - out := new(SaveValueResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *valueService) GetValue(ctx context.Context, in *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) { - req := c.c.NewRequest(c.name, "ValueService.GetValue", in) - out := new(GetValueResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *valueService) ListValues(ctx context.Context, in *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) { - req := c.c.NewRequest(c.name, "ValueService.ListValues", in) - out := new(ListValuesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *valueService) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) { - req := c.c.NewRequest(c.name, "ValueService.GetValueByUniqueIdentifiers", in) - out := new(GetValueResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for ValueService service - -type ValueServiceHandler interface { - SaveValue(context.Context, *SaveValueRequest, *SaveValueResponse) error - GetValue(context.Context, *GetValueRequest, *GetValueResponse) error - ListValues(context.Context, *ListValuesRequest, *ListValuesResponse) error - GetValueByUniqueIdentifiers(context.Context, *GetValueByUniqueIdentifiersRequest, *GetValueResponse) error -} - -func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts ...server.HandlerOption) error { - type valueService interface { - SaveValue(ctx context.Context, in *SaveValueRequest, out *SaveValueResponse) error - GetValue(ctx context.Context, in *GetValueRequest, out *GetValueResponse) error - ListValues(ctx context.Context, in *ListValuesRequest, out *ListValuesResponse) error - GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, out *GetValueResponse) error - } - type ValueService struct { - valueService - } - h := &valueServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "ValueService.SaveValue", - Path: []string{"/api/v0/settings/values-save"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "ValueService.GetValue", - Path: []string{"/api/v0/settings/values-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "ValueService.ListValues", - Path: []string{"/api/v0/settings/values-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "ValueService.GetValueByUniqueIdentifiers", - Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&ValueService{h}, opts...)) -} - -type valueServiceHandler struct { - ValueServiceHandler -} - -func (h *valueServiceHandler) SaveValue(ctx context.Context, in *SaveValueRequest, out *SaveValueResponse) error { - return h.ValueServiceHandler.SaveValue(ctx, in, out) -} - -func (h *valueServiceHandler) GetValue(ctx context.Context, in *GetValueRequest, out *GetValueResponse) error { - return h.ValueServiceHandler.GetValue(ctx, in, out) -} - -func (h *valueServiceHandler) ListValues(ctx context.Context, in *ListValuesRequest, out *ListValuesResponse) error { - return h.ValueServiceHandler.ListValues(ctx, in, out) -} - -func (h *valueServiceHandler) GetValueByUniqueIdentifiers(ctx context.Context, in *GetValueByUniqueIdentifiersRequest, out *GetValueResponse) error { - return h.ValueServiceHandler.GetValueByUniqueIdentifiers(ctx, in, out) -} - -// Api Endpoints for RoleService service - -func NewRoleServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "RoleService.ListRoles", - Path: []string{"/api/v0/settings/roles-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "RoleService.ListRoleAssignments", - Path: []string{"/api/v0/settings/assignments-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "RoleService.AssignRoleToUser", - Path: []string{"/api/v0/settings/assignments-add"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "RoleService.RemoveRoleFromUser", - Path: []string{"/api/v0/settings/assignments-remove"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for RoleService service - -type RoleService interface { - ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) - ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) - AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) - RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -type roleService struct { - c client.Client - name string -} - -func NewRoleService(name string, c client.Client) RoleService { - return &roleService{ - c: c, - name: name, - } -} - -func (c *roleService) ListRoles(ctx context.Context, in *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { - req := c.c.NewRequest(c.name, "RoleService.ListRoles", in) - out := new(ListBundlesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *roleService) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) { - req := c.c.NewRequest(c.name, "RoleService.ListRoleAssignments", in) - out := new(ListRoleAssignmentsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *roleService) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) { - req := c.c.NewRequest(c.name, "RoleService.AssignRoleToUser", in) - out := new(AssignRoleToUserResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *roleService) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "RoleService.RemoveRoleFromUser", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for RoleService service - -type RoleServiceHandler interface { - ListRoles(context.Context, *ListBundlesRequest, *ListBundlesResponse) error - ListRoleAssignments(context.Context, *ListRoleAssignmentsRequest, *ListRoleAssignmentsResponse) error - AssignRoleToUser(context.Context, *AssignRoleToUserRequest, *AssignRoleToUserResponse) error - RemoveRoleFromUser(context.Context, *RemoveRoleFromUserRequest, *emptypb.Empty) error -} - -func RegisterRoleServiceHandler(s server.Server, hdlr RoleServiceHandler, opts ...server.HandlerOption) error { - type roleService interface { - ListRoles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error - ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, out *ListRoleAssignmentsResponse) error - AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, out *AssignRoleToUserResponse) error - RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, out *emptypb.Empty) error - } - type RoleService struct { - roleService - } - h := &roleServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "RoleService.ListRoles", - Path: []string{"/api/v0/settings/roles-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "RoleService.ListRoleAssignments", - Path: []string{"/api/v0/settings/assignments-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "RoleService.AssignRoleToUser", - Path: []string{"/api/v0/settings/assignments-add"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "RoleService.RemoveRoleFromUser", - Path: []string{"/api/v0/settings/assignments-remove"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&RoleService{h}, opts...)) -} - -type roleServiceHandler struct { - RoleServiceHandler -} - -func (h *roleServiceHandler) ListRoles(ctx context.Context, in *ListBundlesRequest, out *ListBundlesResponse) error { - return h.RoleServiceHandler.ListRoles(ctx, in, out) -} - -func (h *roleServiceHandler) ListRoleAssignments(ctx context.Context, in *ListRoleAssignmentsRequest, out *ListRoleAssignmentsResponse) error { - return h.RoleServiceHandler.ListRoleAssignments(ctx, in, out) -} - -func (h *roleServiceHandler) AssignRoleToUser(ctx context.Context, in *AssignRoleToUserRequest, out *AssignRoleToUserResponse) error { - return h.RoleServiceHandler.AssignRoleToUser(ctx, in, out) -} - -func (h *roleServiceHandler) RemoveRoleFromUser(ctx context.Context, in *RemoveRoleFromUserRequest, out *emptypb.Empty) error { - return h.RoleServiceHandler.RemoveRoleFromUser(ctx, in, out) -} - -// Api Endpoints for PermissionService service - -func NewPermissionServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "PermissionService.ListPermissionsByResource", - Path: []string{"/api/v0/settings/permissions-list-by-resource"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "PermissionService.GetPermissionByID", - Path: []string{"/api/v0/settings/permissions-get-by-id"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for PermissionService service - -type PermissionService interface { - ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) - GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) -} - -type permissionService struct { - c client.Client - name string -} - -func NewPermissionService(name string, c client.Client) PermissionService { - return &permissionService{ - c: c, - name: name, - } -} - -func (c *permissionService) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) { - req := c.c.NewRequest(c.name, "PermissionService.ListPermissionsByResource", in) - out := new(ListPermissionsByResourceResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *permissionService) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) { - req := c.c.NewRequest(c.name, "PermissionService.GetPermissionByID", in) - out := new(GetPermissionByIDResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for PermissionService service - -type PermissionServiceHandler interface { - ListPermissionsByResource(context.Context, *ListPermissionsByResourceRequest, *ListPermissionsByResourceResponse) error - GetPermissionByID(context.Context, *GetPermissionByIDRequest, *GetPermissionByIDResponse) error -} - -func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHandler, opts ...server.HandlerOption) error { - type permissionService interface { - ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error - GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, out *GetPermissionByIDResponse) error - } - type PermissionService struct { - permissionService - } - h := &permissionServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "PermissionService.ListPermissionsByResource", - Path: []string{"/api/v0/settings/permissions-list-by-resource"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "PermissionService.GetPermissionByID", - Path: []string{"/api/v0/settings/permissions-get-by-id"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&PermissionService{h}, opts...)) -} - -type permissionServiceHandler struct { - PermissionServiceHandler -} - -func (h *permissionServiceHandler) ListPermissionsByResource(ctx context.Context, in *ListPermissionsByResourceRequest, out *ListPermissionsByResourceResponse) error { - return h.PermissionServiceHandler.ListPermissionsByResource(ctx, in, out) -} - -func (h *permissionServiceHandler) GetPermissionByID(ctx context.Context, in *GetPermissionByIDRequest, out *GetPermissionByIDResponse) error { - return h.PermissionServiceHandler.GetPermissionByID(ctx, in, out) -} diff --git a/settings/pkg/proto/v0/settings.pb.micro_test.go b/settings/pkg/proto/v0/settings.pb.micro_test.go deleted file mode 100644 index ec15d60a7ee..00000000000 --- a/settings/pkg/proto/v0/settings.pb.micro_test.go +++ /dev/null @@ -1,1643 +0,0 @@ -package proto_test - -import ( - "context" - "encoding/json" - "fmt" - "log" - "net/http" - "os" - "testing" - - ocislog "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/ocis-pkg/middleware" - "github.com/owncloud/ocis/ocis-pkg/service/grpc" - "github.com/owncloud/ocis/settings/pkg/config" - "github.com/owncloud/ocis/settings/pkg/proto/v0" - svc "github.com/owncloud/ocis/settings/pkg/service/v0" - store "github.com/owncloud/ocis/settings/pkg/store/filesystem" - "github.com/stretchr/testify/assert" - merrors "go-micro.dev/v4/errors" - "go-micro.dev/v4/metadata" -) - -var ( - service grpc.Service - handler svc.Service - bundleService proto.BundleService - valueService proto.ValueService - roleService proto.RoleService - permissionService proto.PermissionService - - testAccountID = "e8a7f56b-10ce-4f67-b67f-eca40aa0ef26" - - settingsStub = []*proto.Setting{ - { - Id: "336c4db1-5062-4931-990f-d88e6b02cb02", - DisplayName: "dummy setting", - Name: "dummy-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "dummy setting", - }, - } - - //optionsForListStub for choice list settings - optionsForListStub = []*proto.ListOption{ - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_StringValue{StringValue: "list option string value"}, - }, - Default: true, - DisplayValue: "a string value", - }, - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_IntValue{IntValue: 123}, - }, - Default: true, - DisplayValue: "a int value", - }, - } - - //MultiChoiceList - multipleChoiceSettingStub = proto.MultiChoiceList{ - Options: optionsForListStub, - } - - //SingleChoiceList - singleChoiceSettingStub = proto.SingleChoiceList{ - Options: optionsForListStub, - } - - complexSettingsStub = []*proto.Setting{ - { - Name: "int", - Id: "4e00633d-5373-4df4-9299-1c9ed9c3ebed", - DisplayName: "an integer value", - Description: "with some description", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 1, - Min: 1, - Max: 124, - Step: 1, - Placeholder: "Int value", - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - }, - { - Name: "string", - Id: "f792acb4-9f09-4fa8-92d3-4a0d0a6ca721", - DisplayName: "a string value", - Description: "with some description", - Value: &proto.Setting_StringValue{ - StringValue: &proto.String{ - Default: "thedefaultvalue", - Required: false, - MinLength: 2, - MaxLength: 255, - Placeholder: "a string value", - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - }, - { - Name: "bool", - Id: "6ef9268c-f0bd-48a7-a0a0-3ba3ee42b5cc", - DisplayName: "a bool value", - Description: "with some description", - Value: &proto.Setting_BoolValue{ - BoolValue: &proto.Bool{ - Default: false, - Label: "bool setting", - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - }, - { - Name: "multipleChoice", - Id: "905da88c-3be0-42c2-a8b2-e6bcd9976b2d", - DisplayName: "a multiple choice setting", - Description: "with some description", - Value: &proto.Setting_MultiChoiceValue{ - MultiChoiceValue: &multipleChoiceSettingStub, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - }, - { - Name: "singleChoice", - Id: "5bf4de47-57cc-4705-a456-4fcf39673994", - DisplayName: "a single choice setting", - Description: "with some description", - Value: &proto.Setting_SingleChoiceValue{ - SingleChoiceValue: &singleChoiceSettingStub, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - }, - } - - bundleStub = proto.Bundle{ - Name: "test", - Id: "b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", - DisplayName: "bundleDisplayName", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - } -) - -const dataPath = "/tmp/grpc-tests-ocis-settings" - -func init() { - service = grpc.NewService( - grpc.Namespace("com.owncloud.api"), - grpc.Name("settings"), - grpc.Address("localhost:9992"), - ) - - cfg := config.DefaultConfig() - cfg.DataPath = dataPath - handler = svc.NewService(cfg, ocislog.NewLogger(ocislog.Color(true), ocislog.Pretty(true))) - err := proto.RegisterBundleServiceHandler(service.Server(), handler) - if err != nil { - log.Fatalf("could not register BundleServiceHandler: %v", err) - } - err = proto.RegisterValueServiceHandler(service.Server(), handler) - if err != nil { - log.Fatalf("could not register ValueServiceHandler: %v", err) - } - err = proto.RegisterRoleServiceHandler(service.Server(), handler) - if err != nil { - log.Fatalf("could not register RoleServiceHandler: %v", err) - } - err = proto.RegisterPermissionServiceHandler(service.Server(), handler) - if err != nil { - log.Fatalf("could not register PermissionServiceHandler: %v", err) - } - - if err = service.Server().Start(); err != nil { - log.Fatalf("could not start server: %v", err) - } - - client := service.Client() - bundleService = proto.NewBundleService("com.owncloud.api.settings", client) - valueService = proto.NewValueService("com.owncloud.api.settings", client) - roleService = proto.NewRoleService("com.owncloud.api.settings", client) - permissionService = proto.NewPermissionService("com.owncloud.api.settings", client) -} - -func setup() func() { - handler.RegisterDefaultRoles() - return func() { - if err := os.RemoveAll(dataPath); err != nil { - log.Printf("could not delete data root: %s", dataPath) - } else { - log.Println("data root deleted") - } - } -} - -/** -testing that saving a settings bundle and retrieving it again works correctly -using various setting bundle properties -*/ -func TestBundleInputValidation(t *testing.T) { - var scenarios = []struct { - name string - bundleName string - displayName string - extensionName string - expectedError error - }{ - { - "ASCII", - "bundle-name", - "simple-bundle-key", - "simple-extension-name", - nil, - }, - { - "UTF validation on bundle name", - "सिम्प्ले-bundle-name", - "सिम्प्ले-display-name", - "सिम्प्ले-extension-name", - merrors.New("ocis-settings", "extension: must be in a valid format; name: must be in a valid format.", http.StatusBadRequest), - }, - { - "UTF validation on display name", - "सिम्प्ले-bundle-name", - "सिम्प्ले-display-name", - "simple-extension-name", - merrors.New("ocis-settings", "name: must be in a valid format.", http.StatusBadRequest), - }, - { - "extension name with ../ in the name", - "bundle-name", - "simple-display-name", - "../folder-a-level-higher-up", - merrors.New("ocis-settings", "extension: must be in a valid format.", http.StatusBadRequest), - }, - { - "extension name with \\ in the name", - "bundle-name", - "simple-display-name", - "\\", - merrors.New("ocis-settings", "extension: must be in a valid format.", http.StatusBadRequest), - }, - { - "spaces are disallowed in bundle names", - "bundle name", - "simple display name", - "simple extension name", - merrors.New("ocis-settings", "extension: must be in a valid format; name: must be in a valid format.", http.StatusBadRequest), - }, - { - "spaces are allowed in display names", - "bundle-name", - "simple display name", - "simple-extension-name", - nil, - }, - { - "extension missing", - "bundle-name", - "simple-display-name", - "", - merrors.New("ocis-settings", "extension: cannot be blank.", http.StatusBadRequest), - }, - { - "display name missing", - "bundleName", - "", - "simple-extension-name", - merrors.New("ocis-settings", "display_name: cannot be blank.", http.StatusBadRequest), - }, - } - for _, scenario := range scenarios { - t.Run(scenario.name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - bundle := proto.Bundle{ - Name: scenario.bundleName, - Extension: scenario.extensionName, - DisplayName: scenario.displayName, - Type: proto.Bundle_TYPE_DEFAULT, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - Settings: settingsStub, - } - createRequest := proto.SaveBundleRequest{ - Bundle: &bundle, - } - - cresponse, err := bundleService.SaveBundle(ctx, &createRequest) - if err != nil || scenario.expectedError != nil { - t.Log(err) - assert.Equal(t, scenario.expectedError, err) - } else { - assert.Equal(t, scenario.extensionName, cresponse.Bundle.Extension) - assert.Equal(t, scenario.displayName, cresponse.Bundle.DisplayName) - - // we want to test input validation, so just allow the request permission-wise - setFullReadWriteOnBundleForAdmin(ctx, t, cresponse.Bundle.Id) - - getRequest := proto.GetBundleRequest{BundleId: cresponse.Bundle.Id} - getResponse, err := bundleService.GetBundle(ctx, &getRequest) - assert.NoError(t, err) - if err == nil { - assert.Equal(t, scenario.displayName, getResponse.Bundle.DisplayName) - } - } - }) - } -} - -func TestSaveBundleWithoutSettings(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - createRequest := proto.SaveBundleRequest{ - Bundle: &proto.Bundle{ - DisplayName: "Alice's Bundle", - }, - } - response, err := bundleService.SaveBundle(ctx, &createRequest) - assert.Error(t, err) - assert.Nil(t, response) - assert.Equal(t, merrors.New("ocis-settings", "extension: cannot be blank; name: cannot be blank; settings: cannot be blank.", http.StatusBadRequest), err) -} - -func TestGetBundleOfABundleSavedWithoutPermissions(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - saveRequest := proto.SaveBundleRequest{ - Bundle: &bundleStub, - } - saveResponse, err := bundleService.SaveBundle(ctx, &saveRequest) - assert.NoError(t, err) - assert.Equal(t, bundleStub.Id, saveResponse.Bundle.Id) - - getRequest := proto.GetBundleRequest{BundleId: bundleStub.Id} - getResponse, err := bundleService.GetBundle(ctx, &getRequest) - assert.Empty(t, getResponse) - - assert.Equal(t, merrors.New("ocis-settings", "could not read bundle: b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", http.StatusNotFound), err) -} - -func TestGetBundleHavingFullPermissionsOnAnotherRole(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - saveRequest := proto.SaveBundleRequest{ - Bundle: &bundleStub, - } - saveResponse, err := bundleService.SaveBundle(ctx, &saveRequest) - assert.NoError(t, err) - assert.Equal(t, bundleStub.Id, saveResponse.Bundle.Id) - - setFullReadWriteOnBundleForAdmin(ctx, t, bundleStub.Id) - - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleUser)) - getRequest := proto.GetBundleRequest{BundleId: bundleStub.Id} - getResponse, err := bundleService.GetBundle(ctx, &getRequest) - assert.Empty(t, getResponse) - - assert.Equal(t, merrors.New("ocis-settings", "could not read bundle: b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", http.StatusNotFound), err) -} - -/** -testing that setting getting and listing a settings bundle works correctly with a set of setting definitions -*/ -func TestSaveAndGetBundle(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - saveRequest := proto.SaveBundleRequest{ - Bundle: &bundleStub, - } - - // assert that SaveBundle returns the same bundle as we have sent - saveResponse, err := bundleService.SaveBundle(ctx, &saveRequest) - assert.NoError(t, err) - receivedBundle, _ := json.Marshal(saveResponse.Bundle.Settings) - expectedBundle, _ := json.Marshal(&bundleStub.Settings) - assert.Equal(t, receivedBundle, expectedBundle) - - // set full permissions for getting the created bundle - setFullReadWriteOnBundleForAdmin(ctx, t, saveResponse.Bundle.Id) - - //assert that GetBundle returns the same bundle as saved - getRequest := proto.GetBundleRequest{BundleId: saveResponse.Bundle.Id} - getResponse, err := bundleService.GetBundle(ctx, &getRequest) - assert.NoError(t, err) - if err == nil { - receivedBundle, _ = json.Marshal(getResponse.Bundle.Settings) - assert.Equal(t, expectedBundle, receivedBundle) - } -} - -/** -testing that saving a value works and can be retrieved again -*/ -func TestSaveGetIntValue(t *testing.T) { - tests := []struct { - name string - value proto.Value_IntValue - }{ - { - name: "simple int", - value: proto.Value_IntValue{IntValue: 43}, - }, - { - name: "negative", - value: proto.Value_IntValue{IntValue: -42}, - // no validation for SaveValue https://github.com/owncloud/ocis/issues/1445 - }, - { - name: "less than Min", - value: proto.Value_IntValue{IntValue: 0}, - // no validation for SaveValue https://github.com/owncloud/ocis/issues/1445 - }, - { - name: "more than Max", - value: proto.Value_IntValue{IntValue: 128}, - // no validation for SaveValue https://github.com/owncloud/ocis/issues/1445 - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - saveResponse, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: &bundleStub, - }) - assert.NoError(t, err) - - saveValueResponse, err := valueService.SaveValue(ctx, &proto.SaveValueRequest{ - Value: &proto.Value{ - BundleId: saveResponse.Bundle.Id, - SettingId: "4e00633d-5373-4df4-9299-1c9ed9c3ebed", //setting id of the int setting - AccountUuid: "047d31b0-219a-47a4-8ee5-c5fa3802a3c2", - Value: &tt.value, - Resource: &proto.Resource{ - Type: 0, - Id: ".", - }, - }, - }) - assert.NoError(t, err) - assert.Equal(t, tt.value.IntValue, saveValueResponse.Value.Value.GetIntValue()) - - getValueResponse, err := valueService.GetValue( - ctx, &proto.GetValueRequest{Id: saveValueResponse.Value.Value.Id}, - ) - assert.NoError(t, err) - assert.Equal(t, tt.value.IntValue, getValueResponse.Value.Value.GetIntValue()) - }) - } -} - -/** -try to save a wrong type of the value -no validation for SaveValue https://github.com/owncloud/ocis/issues/1445 -*/ -func TestSaveGetIntValueIntoString(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - saveResponse, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: &bundleStub, - }) - assert.NoError(t, err) - - saveValueResponse, err := valueService.SaveValue(ctx, &proto.SaveValueRequest{ - Value: &proto.Value{ - BundleId: saveResponse.Bundle.Id, - SettingId: "f792acb4-9f09-4fa8-92d3-4a0d0a6ca721", //setting id of the string setting - AccountUuid: "047d31b0-219a-47a4-8ee5-c5fa3802a3c2", - Value: &proto.Value_StringValue{StringValue: "forty two"}, - Resource: &proto.Resource{ - Type: 0, - Id: ".", - }, - }, - }) - assert.NoError(t, err) - assert.Equal(t, "forty two", saveValueResponse.Value.Value.GetStringValue()) - - getValueResponse, err := valueService.GetValue( - ctx, &proto.GetValueRequest{Id: saveValueResponse.Value.Value.Id}, - ) - assert.NoError(t, err) - assert.Equal(t, "forty two", getValueResponse.Value.Value.GetStringValue()) -} - -// no plausibility check in settings of bundle https://github.com/owncloud/ocis/issues/1455 -func TestSaveBundleWithInvalidSettings(t *testing.T) { - var tests = []proto.Setting{ - { - Name: "intValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "intValue default is out of range", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 30, - Min: 10, - Max: 20, - }, - }, - }, - { - Name: "intValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "intValue min gt max", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 100, - Min: 100, - Max: 20, - }, - }, - }, - { - Name: "intValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "intValue step gt max-min", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Min: 10, - Max: 20, - Step: 100, - }, - }, - }, - { - Name: "intValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "intValue step eq 0", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Min: 10, - Max: 20, - Step: 0, - }, - }, - }, - { - Name: "intValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "intValue step lt 0", - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Min: 10, - Max: 20, - Step: -10, - }, - }, - }, - { - Name: "stringValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "stringValue MinLength gt MaxLength", - Value: &proto.Setting_StringValue{ - StringValue: &proto.String{ - MinLength: 255, - MaxLength: 1, - }, - }, - }, - { - Name: "stringValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "stringValue MaxLength eq 0", - Value: &proto.Setting_StringValue{ - StringValue: &proto.String{ - MaxLength: 0, - }, - }, - }, - { - Name: "stringValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "stringValue MinLength lt 0", - Value: &proto.Setting_StringValue{ - StringValue: &proto.String{ - MinLength: -1, - }, - }, - }, - { - Name: "stringValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "stringValue MaxLength lt 0", - Value: &proto.Setting_StringValue{ - StringValue: &proto.String{ - MaxLength: -1, - }, - }, - }, - { - Name: "multiChoiceValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "multiChoice multiple options are default", - Value: &proto.Setting_MultiChoiceValue{ - MultiChoiceValue: &proto.MultiChoiceList{ - Options: []*proto.ListOption{ - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_IntValue{IntValue: 1}, - }, - Default: true, - }, - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_IntValue{IntValue: 2}, - }, - Default: true, - }, - }, - }, - }, - }, - { - Name: "singleChoiceValue", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Description: "singleChoice multiple options are default", - Value: &proto.Setting_SingleChoiceValue{ - SingleChoiceValue: &proto.SingleChoiceList{ - Options: []*proto.ListOption{ - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_IntValue{IntValue: 1}, - }, - Default: true, - }, - { - Value: &proto.ListOptionValue{ - Option: &proto.ListOptionValue_IntValue{IntValue: 2}, - }, - Default: true, - }, - }, - }, - }, - }, - } - - for index := range tests { - t.Run(tests[index].Name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - var settings []*proto.Setting - - settings = append(settings, &tests[index]) - bundle := proto.Bundle{ - Name: "bundle", - Extension: "bundleExtension", - DisplayName: "bundledisplayname", - Type: proto.Bundle_TYPE_DEFAULT, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - Settings: settings, - } - saveRequest := proto.SaveBundleRequest{ - Bundle: &bundle, - } - - //assert that SaveBundle returns the same bundle as we have sent there - saveResponse, err := bundleService.SaveBundle(ctx, &saveRequest) - assert.NoError(t, err) - receivedBundle, _ := json.Marshal(saveResponse.Bundle.Settings) - expectedBundle, _ := json.Marshal(&bundle.Settings) - assert.Equal(t, expectedBundle, receivedBundle) - }) - } -} - -func TestGetBundleNoSideEffectsOnDisk(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - getRequest := proto.GetBundleRequest{BundleId: "non-existing-bundle"} - - _, _ = bundleService.GetBundle(ctx, &getRequest) - assert.NoDirExists(t, store.Name+"/bundles/non-existing-bundle") - assert.NoFileExists(t, store.Name+"/bundles/non-existing-bundle/not-existing-bundle.json") -} - -// TODO non-deterministic. Fix. -func TestCreateRoleAndAssign(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - res, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: &proto.Bundle{ - Type: proto.Bundle_TYPE_ROLE, - DisplayName: "test role - update", - Name: "TEST_ROLE", - Extension: "ocis-settings", - Settings: []*proto.Setting{ - { - Name: "settingName", - Resource: &proto.Resource{ - Id: settingsStub[0].Id, - Type: proto.Resource_TYPE_SETTING, - }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_UPDATE, - Constraint: proto.Permission_CONSTRAINT_OWN, - }, - }, - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - }) - if err == nil { - _, err = roleService.AssignRoleToUser(ctx, &proto.AssignRoleToUserRequest{ - AccountUuid: "4c510ada-c86b-4815-8820-42cdf82c3d51", - RoleId: res.Bundle.Id, - }) - if err != nil { - fmt.Println(err) - } - assert.NoError(t, err) - } -} - -// // TODO this tests are non-deterministic at least on my machine. Find a way to make them deterministic. -// func TestListBundlesOnAuthorizedUser(t *testing.T) { -// client := service.Client() -// client2 := service.Client() -// cl := proto.NewBundleService("com.owncloud.api.settings", client) -// rc := proto.NewRoleService("com.owncloud.api.settings", client2) - -// _, err := cl.SaveBundle(context.Background(), &proto.SaveBundleRequest{ -// Bundle: &proto.Bundle{ -// DisplayName: "Alice's Bundle", -// Name: "bundle1", -// Extension: "extension1", -// Resource: &proto.Resource{ -// Type: proto.Resource_TYPE_BUNDLE, -// }, -// Type: proto.Bundle_TYPE_DEFAULT, -// Settings: settingsStub, -// }, -// }) -// assert.NoError(t, err) - -// res, err := cl.SaveBundle(context.Background(), &proto.SaveBundleRequest{ -// Bundle: &proto.Bundle{ -// // Id: "f36db5e6-a03c-40df-8413-711c67e40b47", // bug: providing the ID ignores its value for the filename. -// Type: proto.Bundle_TYPE_ROLE, -// DisplayName: "test role - update", -// Name: "TEST_ROLE", -// Extension: "ocis-settings", -// Settings: []*proto.Setting{ -// { -// Name: "settingName", -// Resource: &proto.Resource{ -// Id: settingsStub[0].Id, -// Type: proto.Resource_TYPE_SETTING, -// }, -// Value: &proto.Setting_PermissionValue{ -// &proto.Permission{ -// Operation: proto.PermissionSetting_OPERATION_UPDATE, -// Constraint: proto.PermissionSetting_CONSTRAINT_OWN, -// }, -// }, -// }, -// }, -// Resource: &proto.Resource{ -// Type: proto.Resource_TYPE_SYSTEM, -// }, -// }, -// }) -// assert.NoError(t, err) - -// _, err = rc.AssignRoleToUser(context.Background(), &proto.AssignRoleToUserRequest{ -// AccountUuid: "4c510ada-c86b-4815-8820-42cdf82c3d51", -// RoleId: res.Bundle.Id, -// }) -// assert.NoError(t, err) - -// time.Sleep(200 * time.Millisecond) -// listRequest := proto.ListSettingsBundlesRequest{AccountUuid: "4c510ada-c86b-4815-8820-42cdf82c3d51"} - -// response, err := cl.ListSettingsBundles(context.Background(), &listRequest) -// assert.NoError(t, err) -// assert.Equal(t, 1, len(response.Bundles)) -// assert.Equal(t, response.Bundles[0].Name, "bundle1") -// - -func TestListRolesAfterSavingBundle(t *testing.T) { - type expectedBundle struct { - displayName string - name string - } - - tests := []struct { - name string - bundles []*proto.Bundle - expectedBundles []expectedBundle - }{ - {"don't add bundle", - []*proto.Bundle{}, - []expectedBundle{ - {displayName: "Guest", name: "guest"}, - {displayName: "Admin", name: "admin"}, - {displayName: "User", name: "user"}, - }, - }, - {name: "one bundle", - bundles: []*proto.Bundle{{ - Type: proto.Bundle_TYPE_ROLE, - DisplayName: "test role - update", - Name: "TEST_ROLE", - Extension: "ocis-settings", - Settings: []*proto.Setting{ - { - Name: "settingName", - Resource: &proto.Resource{ - Id: settingsStub[0].Id, - Type: proto.Resource_TYPE_SETTING, - }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_UPDATE, - Constraint: proto.Permission_CONSTRAINT_OWN, - }, - }, - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }}, - expectedBundles: []expectedBundle{ - {displayName: "test role - update", name: "TEST_ROLE"}, - {displayName: "Guest", name: "guest"}, - {displayName: "Admin", name: "admin"}, - {displayName: "User", name: "user"}, - }, - }, - {name: "two added bundles", - bundles: []*proto.Bundle{{ - Type: proto.Bundle_TYPE_ROLE, - DisplayName: "test role - update", - Name: "TEST_ROLE", - Extension: "ocis-settings", - Settings: []*proto.Setting{ - { - Name: "settingName", - Resource: &proto.Resource{ - Id: settingsStub[0].Id, - Type: proto.Resource_TYPE_SETTING, - }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_UPDATE, - Constraint: proto.Permission_CONSTRAINT_OWN, - }, - }, - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - { - Type: proto.Bundle_TYPE_ROLE, - DisplayName: "an other role", - Name: "AnOtherROLE", - Extension: "ocis-settings", - Settings: []*proto.Setting{ - { - Name: "settingName", - Resource: &proto.Resource{ - Id: settingsStub[0].Id, - Type: proto.Resource_TYPE_SETTING, - }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_UPDATE, - Constraint: proto.Permission_CONSTRAINT_OWN, - }, - }, - }, - }, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }}, - expectedBundles: []expectedBundle{ - {displayName: "test role - update", name: "TEST_ROLE"}, - {displayName: "an other role", name: "AnOtherROLE"}, - {displayName: "Guest", name: "guest"}, - {displayName: "Admin", name: "admin"}, - {displayName: "User", name: "user"}, - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - for _, bundle := range tt.bundles { - _, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: bundle, - }) - assert.NoError(t, err) - } - rolesRes, err := roleService.ListRoles(ctx, &proto.ListBundlesRequest{}) - assert.NoError(t, err) - - for _, bundle := range rolesRes.Bundles { - assert.Contains(t, tt.expectedBundles, expectedBundle{ - displayName: bundle.DisplayName, - name: bundle.Name, - }) - } - }) - } -} - -func TestListFilteredBundle(t *testing.T) { - type expectedBundle struct { - displayName string - name string - } - - type permission struct { - permission proto.Permission_Operation - roleUUID string - } - - type bundleForTest struct { - bundle *proto.Bundle - permission permission - } - - tests := []struct { - name string - bundles []bundleForTest - expectedBundles []expectedBundle - }{ - { - name: "multiple bundles, all have READ(WRITE) permission", - bundles: []bundleForTest{ - { - bundle: &proto.Bundle{ - Name: "test", - Id: "b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", - DisplayName: "bundleDisplayName", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "one-more", - Id: "3b9f230a-fc9e-4605-89ee-a21e24728c64", - DisplayName: "an other bundle", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READ, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - }, - expectedBundles: []expectedBundle{ - {displayName: "bundleDisplayName", name: "test"}, - {displayName: "an other bundle", name: "one-more"}, - }, - }, - { - name: "multiple bundles, only one with READ permission", - bundles: []bundleForTest{ - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_WRITE", - Id: "12fe2b67-4a08-4f17-9cb6-924da943da0e", - DisplayName: "Permission_OPERATION_WRITE", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_WRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_DELETE", - Id: "1a0b65b0-fdbf-4738-b41e-41d36a01376e", - DisplayName: "Permission_OPERATION_DELETE", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_DELETE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_UPDATE", - Id: "511fe78e-89c9-4237-a01e-6af5457a135e", - DisplayName: "Permission_OPERATION_UPDATE", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_UPDATE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_CREATE", - Id: "aa42fb12-57aa-40c0-b458-3a91f398deba", - DisplayName: "Permission_OPERATION_CREATE", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_CREATE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_UNKNOWN", - Id: "eabb2a18-09e2-4b06-aa62-987e8dc5e908", - DisplayName: "Permission_OPERATION_UNKNOWN", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_UNKNOWN, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "Permission_OPERATION_READ", - Id: "3b9f230a-fc9e-4605-89ee-a21e24728c64", - DisplayName: "Permission_OPERATION_READ", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READ, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - }, - expectedBundles: []expectedBundle{ - {displayName: "Permission_OPERATION_READ", name: "Permission_OPERATION_READ"}, - }, - }, - { - name: "multiple bundles, all have READ permission, but only one matching role", - bundles: []bundleForTest{ - { - bundle: &proto.Bundle{ - Name: "matching-role", - Id: "b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", - DisplayName: "bundleDisplayName", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - bundle: &proto.Bundle{ - Name: "NOT-matching-role", - Id: "3b9f230a-fc9e-4605-89ee-a21e24728c64", - DisplayName: "an other bundle", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READ, - roleUUID: svc.BundleUUIDRoleGuest, - }, - }, - { - bundle: &proto.Bundle{ - Name: "NOT-matching-role2", - Id: "714a5917-627c-40ac-8dc7-5fdac013e4b7", - DisplayName: "an other bundle", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: complexSettingsStub, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - }, - permission: permission{ - permission: proto.Permission_OPERATION_READ, - roleUUID: svc.BundleUUIDRoleUser, - }, - }, - }, - expectedBundles: []expectedBundle{ - {displayName: "bundleDisplayName", name: "matching-role"}, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - for _, testBundle := range tt.bundles { - _, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: testBundle.bundle, - }) - assert.NoError(t, err) - - setPermissionOnBundleOrSetting( - ctx, t, testBundle.bundle.Id, proto.Resource_TYPE_BUNDLE, - testBundle.permission.permission, testBundle.permission.roleUUID, - ) - } - - listRes, err := bundleService.ListBundles(ctx, &proto.ListBundlesRequest{}) - assert.NoError(t, err) - - // we don't want to deep-assert the values returned only add checks on name and displayName - // this will suffice. - listResAsExpectedBundle := make([]expectedBundle, 0) - for i := range listRes.Bundles { - listResAsExpectedBundle = append(listResAsExpectedBundle, expectedBundle{ - displayName: listRes.Bundles[i].DisplayName, - name: listRes.Bundles[i].Name, - }) - } - - for _, bundle := range tt.expectedBundles { - assert.Contains(t, listResAsExpectedBundle, bundle) - } - }) - } -} - -func TestListGetBundleSettingMixedPermission(t *testing.T) { - type expectedSetting struct { - displayName string - name string - } - - type permission struct { - permission proto.Permission_Operation - roleUUID string - } - - type settingsForTest struct { - setting *proto.Setting - permission permission - } - - tests := []struct { - name string - settings []settingsForTest - expectedSettings []expectedSetting - }{ - { - name: "all settings have R/RW permissions", - settings: []settingsForTest{ - { - setting: &proto.Setting{ - Id: "b86fdb0a-801f-4749-ab84-5c99e90dbd6d", - DisplayName: "RW setting", - Name: "RW-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "RW setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "cb1bbe58-27e7-461b-91b1-a9c85c488789", - DisplayName: "RO setting", - Name: "RO-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "RO setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - }, - expectedSettings: []expectedSetting{ - {displayName: "RW setting", name: "RW-setting"}, - {displayName: "RO setting", name: "RO-setting"}, - }, - }, - { - name: "all settings have R/RW permissions but only one the matching user", - settings: []settingsForTest{ - { - setting: &proto.Setting{ - Id: "b86fdb0a-801f-4749-ab84-5c99e90dbd6d", - DisplayName: "matching user", - Name: "matching-user", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "matching user", - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "cb1bbe58-27e7-461b-91b1-a9c85c488789", - DisplayName: "NOT matching user", - Name: "NOT-matching-user", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "NOT matching user", - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleGuest, - }, - }, - }, - expectedSettings: []expectedSetting{ - {displayName: "matching user", name: "matching-user"}, - }, - }, - { - name: "only one settings has READ permissions", - settings: []settingsForTest{ - { - setting: &proto.Setting{ - Id: "b86fdb0a-801f-4749-ab84-5c99e90dbd6d", - DisplayName: "WRITE setting", - Name: "WRITE-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "WRITE setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_WRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "6163c6bf-79f2-43f7-b0ba-1493534bfc10", - DisplayName: "UNKNOWN setting", - Name: "UNKNOWN-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "UNKNOWN setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_UNKNOWN, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "79eda727-9fa1-459f-aaff-f73ed5693419", - DisplayName: "CREATE setting", - Name: "CREATE-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "CREATE setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_CREATE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "2be7ca51-89fb-4968-b9d2-0ac43197adff", - DisplayName: "UPDATE setting", - Name: "UPDATE-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "UPDATE setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_UPDATE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "f1a0005e-e570-4bd8-a18c-b4afaaa8d7d9", - DisplayName: "DELETE setting", - Name: "DELETE-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "DELETE setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_DELETE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - { - setting: &proto.Setting{ - Id: "cb1bbe58-27e7-461b-91b1-a9c85c488789", - DisplayName: "RO setting", - Name: "RO-setting", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_USER, - }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ - Default: 42, - }, - }, - Description: "RO setting", - }, - permission: permission{ - permission: proto.Permission_OPERATION_READWRITE, - roleUUID: svc.BundleUUIDRoleAdmin, - }, - }, - }, - expectedSettings: []expectedSetting{ - {displayName: "RO setting", name: "RO-setting"}, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - teardown := setup() - defer teardown() - - ctx := metadata.Set(context.Background(), middleware.AccountID, testAccountID) - ctx = metadata.Set(ctx, middleware.RoleIDs, getRoleIDAsJSON(svc.BundleUUIDRoleAdmin)) - - // create bundle with the defined settings - var settings []*proto.Setting - - for _, testSetting := range tt.settings { - settings = append(settings, testSetting.setting) - } - - bundle := proto.Bundle{ - Name: "test", - Id: "b1b8c9d0-fb3c-4e12-b868-5a8508218d2e", - DisplayName: "bundleDisplayName", - Extension: "testExtension", - Type: proto.Bundle_TYPE_DEFAULT, - Settings: settings, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, - }, - } - - _, err := bundleService.SaveBundle(ctx, &proto.SaveBundleRequest{ - Bundle: &bundle, - }) - assert.NoError(t, err) - - // set permissions for each setting - for _, testSetting := range tt.settings { - setPermissionOnBundleOrSetting( - ctx, t, testSetting.setting.Id, proto.Resource_TYPE_SETTING, - testSetting.permission.permission, testSetting.permission.roleUUID, - ) - } - - listRes, err := bundleService.ListBundles(ctx, &proto.ListBundlesRequest{}) - assert.NoError(t, err) - - listedSettings := make([]expectedSetting, 0) - for i := range listRes.Bundles { - for _, setting := range listRes.Bundles[i].Settings { - listedSettings = append(listedSettings, expectedSetting{ - displayName: setting.DisplayName, - name: setting.Name, - }) - } - } - - for i := range tt.expectedSettings { - assert.Contains(t, listedSettings, tt.expectedSettings[i]) - } - - getRes, err := bundleService.GetBundle(ctx, &proto.GetBundleRequest{BundleId: bundle.Id}) - assert.NoError(t, err) - - for _, setting := range getRes.Bundle.Settings { - assert.Contains(t, tt.expectedSettings, expectedSetting{ - displayName: setting.DisplayName, - name: setting.Name, - }) - } - }) - } -} - -func setFullReadWriteOnBundleForAdmin(ctx context.Context, t *testing.T, bundleID string) { - setPermissionOnBundleOrSetting( - ctx, t, bundleID, proto.Resource_TYPE_BUNDLE, proto.Permission_OPERATION_READWRITE, svc.BundleUUIDRoleAdmin, - ) -} - -func setPermissionOnBundleOrSetting( - ctx context.Context, - t *testing.T, - bundleID string, - resourceType proto.Resource_Type, - permission proto.Permission_Operation, - roleUUID string, -) { - permissionRequest := proto.AddSettingToBundleRequest{ - BundleId: roleUUID, - Setting: &proto.Setting{ - Name: "test-bundle-permission-readwrite", - Resource: &proto.Resource{ - Type: resourceType, - Id: bundleID, - }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: permission, - Constraint: proto.Permission_CONSTRAINT_OWN, - }, - }, - }, - } - addPermissionResponse, err := bundleService.AddSettingToBundle(ctx, &permissionRequest) - assert.NoError(t, err) - if err == nil { - assert.NotEmpty(t, addPermissionResponse.Setting) - } -} - -func getRoleIDAsJSON(roleID string) string { - roleIDsJSON, _ := json.Marshal([]string{roleID}) - return string(roleIDsJSON) -} diff --git a/settings/pkg/proto/v0/settings.pb.web.go b/settings/pkg/proto/v0/settings.pb.web.go deleted file mode 100644 index 17995d9abb3..00000000000 --- a/settings/pkg/proto/v0/settings.pb.web.go +++ /dev/null @@ -1,1905 +0,0 @@ -// Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: proto.proto - -package proto - -import ( - "bytes" - "encoding/json" - "net/http" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/render" - "github.com/golang/protobuf/jsonpb" - - ptypesempty "github.com/golang/protobuf/ptypes/empty" -) - -type webBundleServiceHandler struct { - r chi.Router - h BundleServiceHandler -} - -func (h *webBundleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webBundleServiceHandler) SaveBundle(w http.ResponseWriter, r *http.Request) { - req := &SaveBundleRequest{} - resp := &SaveBundleResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.SaveBundle( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webBundleServiceHandler) GetBundle(w http.ResponseWriter, r *http.Request) { - req := &GetBundleRequest{} - resp := &GetBundleResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetBundle( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webBundleServiceHandler) ListBundles(w http.ResponseWriter, r *http.Request) { - req := &ListBundlesRequest{} - resp := &ListBundlesResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListBundles( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webBundleServiceHandler) AddSettingToBundle(w http.ResponseWriter, r *http.Request) { - req := &AddSettingToBundleRequest{} - resp := &AddSettingToBundleResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.AddSettingToBundle( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webBundleServiceHandler) RemoveSettingFromBundle(w http.ResponseWriter, r *http.Request) { - req := &RemoveSettingFromBundleRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RemoveSettingFromBundle( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webBundleServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/settings/bundle-save", handler.SaveBundle) - r.MethodFunc("POST", "/api/v0/settings/bundle-get", handler.GetBundle) - r.MethodFunc("POST", "/api/v0/settings/bundles-list", handler.ListBundles) - r.MethodFunc("POST", "/api/v0/settings/bundles-add-setting", handler.AddSettingToBundle) - r.MethodFunc("POST", "/api/v0/settings/bundles-remove-setting", handler.RemoveSettingFromBundle) -} - -type webValueServiceHandler struct { - r chi.Router - h ValueServiceHandler -} - -func (h *webValueServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webValueServiceHandler) SaveValue(w http.ResponseWriter, r *http.Request) { - req := &SaveValueRequest{} - resp := &SaveValueResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.SaveValue( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webValueServiceHandler) GetValue(w http.ResponseWriter, r *http.Request) { - req := &GetValueRequest{} - resp := &GetValueResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetValue( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webValueServiceHandler) ListValues(w http.ResponseWriter, r *http.Request) { - req := &ListValuesRequest{} - resp := &ListValuesResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListValues( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webValueServiceHandler) GetValueByUniqueIdentifiers(w http.ResponseWriter, r *http.Request) { - req := &GetValueByUniqueIdentifiersRequest{} - resp := &GetValueResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetValueByUniqueIdentifiers( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterValueServiceWeb(r chi.Router, i ValueServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webValueServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/settings/values-save", handler.SaveValue) - r.MethodFunc("POST", "/api/v0/settings/values-get", handler.GetValue) - r.MethodFunc("POST", "/api/v0/settings/values-list", handler.ListValues) - r.MethodFunc("POST", "/api/v0/settings/values-get-by-unique-identifiers", handler.GetValueByUniqueIdentifiers) -} - -type webRoleServiceHandler struct { - r chi.Router - h RoleServiceHandler -} - -func (h *webRoleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webRoleServiceHandler) ListRoles(w http.ResponseWriter, r *http.Request) { - req := &ListBundlesRequest{} - resp := &ListBundlesResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListRoles( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webRoleServiceHandler) ListRoleAssignments(w http.ResponseWriter, r *http.Request) { - req := &ListRoleAssignmentsRequest{} - resp := &ListRoleAssignmentsResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListRoleAssignments( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webRoleServiceHandler) AssignRoleToUser(w http.ResponseWriter, r *http.Request) { - req := &AssignRoleToUserRequest{} - resp := &AssignRoleToUserResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.AssignRoleToUser( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webRoleServiceHandler) RemoveRoleFromUser(w http.ResponseWriter, r *http.Request) { - req := &RemoveRoleFromUserRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RemoveRoleFromUser( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func RegisterRoleServiceWeb(r chi.Router, i RoleServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webRoleServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/settings/roles-list", handler.ListRoles) - r.MethodFunc("POST", "/api/v0/settings/assignments-list", handler.ListRoleAssignments) - r.MethodFunc("POST", "/api/v0/settings/assignments-add", handler.AssignRoleToUser) - r.MethodFunc("POST", "/api/v0/settings/assignments-remove", handler.RemoveRoleFromUser) -} - -type webPermissionServiceHandler struct { - r chi.Router - h PermissionServiceHandler -} - -func (h *webPermissionServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webPermissionServiceHandler) ListPermissionsByResource(w http.ResponseWriter, r *http.Request) { - req := &ListPermissionsByResourceRequest{} - resp := &ListPermissionsByResourceResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListPermissionsByResource( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webPermissionServiceHandler) GetPermissionByID(w http.ResponseWriter, r *http.Request) { - req := &GetPermissionByIDRequest{} - resp := &GetPermissionByIDResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetPermissionByID( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterPermissionServiceWeb(r chi.Router, i PermissionServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webPermissionServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/settings/permissions-list-by-resource", handler.ListPermissionsByResource) - r.MethodFunc("POST", "/api/v0/settings/permissions-get-by-id", handler.GetPermissionByID) -} - -// SaveBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of SaveBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveBundleRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *SaveBundleRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SaveBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*SaveBundleRequest)(nil) - -// SaveBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of SaveBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *SaveBundleRequest) UnmarshalJSON(b []byte) error { - return SaveBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*SaveBundleRequest)(nil) - -// SaveBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of SaveBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveBundleResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *SaveBundleResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SaveBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*SaveBundleResponse)(nil) - -// SaveBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of SaveBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *SaveBundleResponse) UnmarshalJSON(b []byte) error { - return SaveBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*SaveBundleResponse)(nil) - -// GetBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetBundleRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetBundleRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetBundleRequest)(nil) - -// GetBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetBundleRequest) UnmarshalJSON(b []byte) error { - return GetBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetBundleRequest)(nil) - -// GetBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetBundleResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetBundleResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetBundleResponse)(nil) - -// GetBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetBundleResponse) UnmarshalJSON(b []byte) error { - return GetBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetBundleResponse)(nil) - -// ListBundlesRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListBundlesRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListBundlesRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListBundlesRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListBundlesRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListBundlesRequest)(nil) - -// ListBundlesRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListBundlesRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListBundlesRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListBundlesRequest) UnmarshalJSON(b []byte) error { - return ListBundlesRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListBundlesRequest)(nil) - -// ListBundlesResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListBundlesResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListBundlesResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListBundlesResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListBundlesResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListBundlesResponse)(nil) - -// ListBundlesResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListBundlesResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListBundlesResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListBundlesResponse) UnmarshalJSON(b []byte) error { - return ListBundlesResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListBundlesResponse)(nil) - -// AddSettingToBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddSettingToBundleRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AddSettingToBundleRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AddSettingToBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AddSettingToBundleRequest)(nil) - -// AddSettingToBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddSettingToBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AddSettingToBundleRequest) UnmarshalJSON(b []byte) error { - return AddSettingToBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AddSettingToBundleRequest)(nil) - -// AddSettingToBundleResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddSettingToBundleResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AddSettingToBundleResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AddSettingToBundleResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AddSettingToBundleResponse)(nil) - -// AddSettingToBundleResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddSettingToBundleResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AddSettingToBundleResponse) UnmarshalJSON(b []byte) error { - return AddSettingToBundleResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AddSettingToBundleResponse)(nil) - -// RemoveSettingFromBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveSettingFromBundleRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RemoveSettingFromBundleRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RemoveSettingFromBundleRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RemoveSettingFromBundleRequest)(nil) - -// RemoveSettingFromBundleRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveSettingFromBundleRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RemoveSettingFromBundleRequest) UnmarshalJSON(b []byte) error { - return RemoveSettingFromBundleRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RemoveSettingFromBundleRequest)(nil) - -// SaveValueRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of SaveValueRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveValueRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *SaveValueRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SaveValueRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*SaveValueRequest)(nil) - -// SaveValueRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of SaveValueRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveValueRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *SaveValueRequest) UnmarshalJSON(b []byte) error { - return SaveValueRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*SaveValueRequest)(nil) - -// SaveValueResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of SaveValueResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveValueResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *SaveValueResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SaveValueResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*SaveValueResponse)(nil) - -// SaveValueResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of SaveValueResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var SaveValueResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *SaveValueResponse) UnmarshalJSON(b []byte) error { - return SaveValueResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*SaveValueResponse)(nil) - -// GetValueRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetValueRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetValueRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetValueRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetValueRequest)(nil) - -// GetValueRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetValueRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetValueRequest) UnmarshalJSON(b []byte) error { - return GetValueRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetValueRequest)(nil) - -// GetValueResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetValueResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetValueResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetValueResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetValueResponse)(nil) - -// GetValueResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetValueResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetValueResponse) UnmarshalJSON(b []byte) error { - return GetValueResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetValueResponse)(nil) - -// ListValuesRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListValuesRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValuesRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListValuesRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListValuesRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListValuesRequest)(nil) - -// ListValuesRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListValuesRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValuesRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListValuesRequest) UnmarshalJSON(b []byte) error { - return ListValuesRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListValuesRequest)(nil) - -// ListValuesResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListValuesResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValuesResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListValuesResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListValuesResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListValuesResponse)(nil) - -// ListValuesResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListValuesResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValuesResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListValuesResponse) UnmarshalJSON(b []byte) error { - return ListValuesResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListValuesResponse)(nil) - -// GetValueByUniqueIdentifiersRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueByUniqueIdentifiersRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetValueByUniqueIdentifiersRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetValueByUniqueIdentifiersRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetValueByUniqueIdentifiersRequest)(nil) - -// GetValueByUniqueIdentifiersRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetValueByUniqueIdentifiersRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetValueByUniqueIdentifiersRequest) UnmarshalJSON(b []byte) error { - return GetValueByUniqueIdentifiersRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetValueByUniqueIdentifiersRequest)(nil) - -// ValueWithIdentifierJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ValueWithIdentifier. This struct is safe to replace or modify but -// should not be done so concurrently. -var ValueWithIdentifierJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ValueWithIdentifier) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ValueWithIdentifierJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ValueWithIdentifier)(nil) - -// ValueWithIdentifierJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ValueWithIdentifier. This struct is safe to replace or modify but -// should not be done so concurrently. -var ValueWithIdentifierJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ValueWithIdentifier) UnmarshalJSON(b []byte) error { - return ValueWithIdentifierJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ValueWithIdentifier)(nil) - -// IdentifierJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Identifier. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentifierJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Identifier) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := IdentifierJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Identifier)(nil) - -// IdentifierJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Identifier. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentifierJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Identifier) UnmarshalJSON(b []byte) error { - return IdentifierJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Identifier)(nil) - -// ListRoleAssignmentsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListRoleAssignmentsRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListRoleAssignmentsRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListRoleAssignmentsRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListRoleAssignmentsRequest)(nil) - -// ListRoleAssignmentsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListRoleAssignmentsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListRoleAssignmentsRequest) UnmarshalJSON(b []byte) error { - return ListRoleAssignmentsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListRoleAssignmentsRequest)(nil) - -// ListRoleAssignmentsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListRoleAssignmentsResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListRoleAssignmentsResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListRoleAssignmentsResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListRoleAssignmentsResponse)(nil) - -// ListRoleAssignmentsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListRoleAssignmentsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListRoleAssignmentsResponse) UnmarshalJSON(b []byte) error { - return ListRoleAssignmentsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListRoleAssignmentsResponse)(nil) - -// AssignRoleToUserRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AssignRoleToUserRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AssignRoleToUserRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AssignRoleToUserRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AssignRoleToUserRequest)(nil) - -// AssignRoleToUserRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AssignRoleToUserRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AssignRoleToUserRequest) UnmarshalJSON(b []byte) error { - return AssignRoleToUserRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AssignRoleToUserRequest)(nil) - -// AssignRoleToUserResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var AssignRoleToUserResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AssignRoleToUserResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AssignRoleToUserResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AssignRoleToUserResponse)(nil) - -// AssignRoleToUserResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var AssignRoleToUserResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AssignRoleToUserResponse) UnmarshalJSON(b []byte) error { - return AssignRoleToUserResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AssignRoleToUserResponse)(nil) - -// RemoveRoleFromUserRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveRoleFromUserRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RemoveRoleFromUserRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RemoveRoleFromUserRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RemoveRoleFromUserRequest)(nil) - -// RemoveRoleFromUserRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveRoleFromUserRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RemoveRoleFromUserRequest) UnmarshalJSON(b []byte) error { - return RemoveRoleFromUserRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RemoveRoleFromUserRequest)(nil) - -// UserRoleAssignmentJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of UserRoleAssignment. This struct is safe to replace or modify but -// should not be done so concurrently. -var UserRoleAssignmentJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *UserRoleAssignment) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := UserRoleAssignmentJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*UserRoleAssignment)(nil) - -// UserRoleAssignmentJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of UserRoleAssignment. This struct is safe to replace or modify but -// should not be done so concurrently. -var UserRoleAssignmentJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *UserRoleAssignment) UnmarshalJSON(b []byte) error { - return UserRoleAssignmentJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*UserRoleAssignment)(nil) - -// ListPermissionsByResourceRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListPermissionsByResourceRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListPermissionsByResourceRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListPermissionsByResourceRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListPermissionsByResourceRequest)(nil) - -// ListPermissionsByResourceRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListPermissionsByResourceRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListPermissionsByResourceRequest) UnmarshalJSON(b []byte) error { - return ListPermissionsByResourceRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListPermissionsByResourceRequest)(nil) - -// ListPermissionsByResourceResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListPermissionsByResourceResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListPermissionsByResourceResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListPermissionsByResourceResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListPermissionsByResourceResponse)(nil) - -// ListPermissionsByResourceResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListPermissionsByResourceResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListPermissionsByResourceResponse) UnmarshalJSON(b []byte) error { - return ListPermissionsByResourceResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListPermissionsByResourceResponse)(nil) - -// GetPermissionByIDRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetPermissionByIDRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetPermissionByIDRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetPermissionByIDRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetPermissionByIDRequest)(nil) - -// GetPermissionByIDRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetPermissionByIDRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetPermissionByIDRequest) UnmarshalJSON(b []byte) error { - return GetPermissionByIDRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetPermissionByIDRequest)(nil) - -// GetPermissionByIDResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetPermissionByIDResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetPermissionByIDResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetPermissionByIDResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetPermissionByIDResponse)(nil) - -// GetPermissionByIDResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetPermissionByIDResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetPermissionByIDResponse) UnmarshalJSON(b []byte) error { - return GetPermissionByIDResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetPermissionByIDResponse)(nil) - -// ResourceJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Resource. This struct is safe to replace or modify but -// should not be done so concurrently. -var ResourceJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Resource) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ResourceJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Resource)(nil) - -// ResourceJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Resource. This struct is safe to replace or modify but -// should not be done so concurrently. -var ResourceJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Resource) UnmarshalJSON(b []byte) error { - return ResourceJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Resource)(nil) - -// BundleJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Bundle. This struct is safe to replace or modify but -// should not be done so concurrently. -var BundleJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Bundle) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := BundleJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Bundle)(nil) - -// BundleJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Bundle. This struct is safe to replace or modify but -// should not be done so concurrently. -var BundleJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Bundle) UnmarshalJSON(b []byte) error { - return BundleJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Bundle)(nil) - -// SettingJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Setting. This struct is safe to replace or modify but -// should not be done so concurrently. -var SettingJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Setting) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SettingJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Setting)(nil) - -// SettingJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Setting. This struct is safe to replace or modify but -// should not be done so concurrently. -var SettingJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Setting) UnmarshalJSON(b []byte) error { - return SettingJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Setting)(nil) - -// IntJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Int. This struct is safe to replace or modify but -// should not be done so concurrently. -var IntJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Int) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := IntJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Int)(nil) - -// IntJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Int. This struct is safe to replace or modify but -// should not be done so concurrently. -var IntJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Int) UnmarshalJSON(b []byte) error { - return IntJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Int)(nil) - -// StringJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of String. This struct is safe to replace or modify but -// should not be done so concurrently. -var StringJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *String) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := StringJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*String)(nil) - -// StringJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of String. This struct is safe to replace or modify but -// should not be done so concurrently. -var StringJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *String) UnmarshalJSON(b []byte) error { - return StringJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*String)(nil) - -// BoolJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Bool. This struct is safe to replace or modify but -// should not be done so concurrently. -var BoolJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Bool) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := BoolJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Bool)(nil) - -// BoolJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Bool. This struct is safe to replace or modify but -// should not be done so concurrently. -var BoolJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Bool) UnmarshalJSON(b []byte) error { - return BoolJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Bool)(nil) - -// SingleChoiceListJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of SingleChoiceList. This struct is safe to replace or modify but -// should not be done so concurrently. -var SingleChoiceListJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *SingleChoiceList) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := SingleChoiceListJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*SingleChoiceList)(nil) - -// SingleChoiceListJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of SingleChoiceList. This struct is safe to replace or modify but -// should not be done so concurrently. -var SingleChoiceListJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *SingleChoiceList) UnmarshalJSON(b []byte) error { - return SingleChoiceListJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*SingleChoiceList)(nil) - -// MultiChoiceListJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of MultiChoiceList. This struct is safe to replace or modify but -// should not be done so concurrently. -var MultiChoiceListJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *MultiChoiceList) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := MultiChoiceListJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*MultiChoiceList)(nil) - -// MultiChoiceListJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of MultiChoiceList. This struct is safe to replace or modify but -// should not be done so concurrently. -var MultiChoiceListJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *MultiChoiceList) UnmarshalJSON(b []byte) error { - return MultiChoiceListJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*MultiChoiceList)(nil) - -// ListOptionJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListOption. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListOptionJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListOption) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListOptionJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListOption)(nil) - -// ListOptionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListOption. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListOptionJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListOption) UnmarshalJSON(b []byte) error { - return ListOptionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListOption)(nil) - -// PermissionJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Permission. This struct is safe to replace or modify but -// should not be done so concurrently. -var PermissionJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Permission) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := PermissionJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Permission)(nil) - -// PermissionJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Permission. This struct is safe to replace or modify but -// should not be done so concurrently. -var PermissionJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Permission) UnmarshalJSON(b []byte) error { - return PermissionJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Permission)(nil) - -// ValueJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Value. This struct is safe to replace or modify but -// should not be done so concurrently. -var ValueJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Value) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ValueJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Value)(nil) - -// ValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Value. This struct is safe to replace or modify but -// should not be done so concurrently. -var ValueJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Value) UnmarshalJSON(b []byte) error { - return ValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Value)(nil) - -// ListValueJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListValue. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValueJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListValue) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListValueJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListValue)(nil) - -// ListValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListValue. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListValueJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListValue) UnmarshalJSON(b []byte) error { - return ListValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListValue)(nil) - -// ListOptionValueJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListOptionValue. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListOptionValueJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListOptionValue) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListOptionValueJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListOptionValue)(nil) - -// ListOptionValueJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListOptionValue. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListOptionValueJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListOptionValue) UnmarshalJSON(b []byte) error { - return ListOptionValueJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListOptionValue)(nil) diff --git a/settings/pkg/proto/v0/settings.swagger.json b/settings/pkg/proto/v0/settings.swagger.json deleted file mode 100644 index 4d2db4d52cf..00000000000 --- a/settings/pkg/proto/v0/settings.swagger.json +++ /dev/null @@ -1,1114 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ownCloud Infinite Scale settings", - "version": "1.0.0", - "contact": { - "name": "ownCloud GmbH", - "url": "https://github.com/owncloud/ocis", - "email": "support@owncloud.com" - }, - "license": { - "name": "Apache-2.0", - "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "BundleService" - }, - { - "name": "ValueService" - }, - { - "name": "RoleService" - }, - { - "name": "PermissionService" - } - ], - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v0/settings/assignments-add": { - "post": { - "operationId": "RoleService_AssignRoleToUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0AssignRoleToUserResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0AssignRoleToUserRequest" - } - } - ], - "tags": [ - "RoleService" - ] - } - }, - "/api/v0/settings/assignments-list": { - "post": { - "operationId": "RoleService_ListRoleAssignments", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListRoleAssignmentsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListRoleAssignmentsRequest" - } - } - ], - "tags": [ - "RoleService" - ] - } - }, - "/api/v0/settings/assignments-remove": { - "post": { - "operationId": "RoleService_RemoveRoleFromUser", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0RemoveRoleFromUserRequest" - } - } - ], - "tags": [ - "RoleService" - ] - } - }, - "/api/v0/settings/bundle-get": { - "post": { - "operationId": "BundleService_GetBundle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0GetBundleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetBundleRequest" - } - } - ], - "tags": [ - "BundleService" - ] - } - }, - "/api/v0/settings/bundle-save": { - "post": { - "operationId": "BundleService_SaveBundle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0SaveBundleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0SaveBundleRequest" - } - } - ], - "tags": [ - "BundleService" - ] - } - }, - "/api/v0/settings/bundles-add-setting": { - "post": { - "operationId": "BundleService_AddSettingToBundle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0AddSettingToBundleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0AddSettingToBundleRequest" - } - } - ], - "tags": [ - "BundleService" - ] - } - }, - "/api/v0/settings/bundles-list": { - "post": { - "operationId": "BundleService_ListBundles", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListBundlesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListBundlesRequest" - } - } - ], - "tags": [ - "BundleService" - ] - } - }, - "/api/v0/settings/bundles-remove-setting": { - "post": { - "operationId": "BundleService_RemoveSettingFromBundle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0RemoveSettingFromBundleRequest" - } - } - ], - "tags": [ - "BundleService" - ] - } - }, - "/api/v0/settings/permissions-get-by-id": { - "post": { - "operationId": "PermissionService_GetPermissionByID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0GetPermissionByIDResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetPermissionByIDRequest" - } - } - ], - "tags": [ - "PermissionService" - ] - } - }, - "/api/v0/settings/permissions-list-by-resource": { - "post": { - "operationId": "PermissionService_ListPermissionsByResource", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListPermissionsByResourceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListPermissionsByResourceRequest" - } - } - ], - "tags": [ - "PermissionService" - ] - } - }, - "/api/v0/settings/roles-list": { - "post": { - "operationId": "RoleService_ListRoles", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListBundlesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListBundlesRequest" - } - } - ], - "tags": [ - "RoleService" - ] - } - }, - "/api/v0/settings/values-get": { - "post": { - "operationId": "ValueService_GetValue", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0GetValueResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetValueRequest" - } - } - ], - "tags": [ - "ValueService" - ] - } - }, - "/api/v0/settings/values-get-by-unique-identifiers": { - "post": { - "operationId": "ValueService_GetValueByUniqueIdentifiers", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0GetValueResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetValueByUniqueIdentifiersRequest" - } - } - ], - "tags": [ - "ValueService" - ] - } - }, - "/api/v0/settings/values-list": { - "post": { - "operationId": "ValueService_ListValues", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListValuesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListValuesRequest" - } - } - ], - "tags": [ - "ValueService" - ] - } - }, - "/api/v0/settings/values-save": { - "post": { - "operationId": "ValueService_SaveValue", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0SaveValueResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0SaveValueRequest" - } - } - ], - "tags": [ - "ValueService" - ] - } - } - }, - "definitions": { - "PermissionConstraint": { - "type": "string", - "enum": [ - "CONSTRAINT_UNKNOWN", - "CONSTRAINT_OWN", - "CONSTRAINT_SHARED", - "CONSTRAINT_ALL" - ], - "default": "CONSTRAINT_UNKNOWN" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "settingsv0ListValue": { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "$ref": "#/definitions/v0ListOptionValue" - } - } - } - }, - "settingsv0Value": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "id is the id of the Value. It is generated on saving it." - }, - "bundleId": { - "type": "string" - }, - "settingId": { - "type": "string", - "description": "setting_id is the id of the setting from within its bundle." - }, - "accountUuid": { - "type": "string" - }, - "resource": { - "$ref": "#/definitions/v0Resource" - }, - "boolValue": { - "type": "boolean" - }, - "intValue": { - "type": "string", - "format": "int64" - }, - "stringValue": { - "type": "string" - }, - "listValue": { - "$ref": "#/definitions/settingsv0ListValue" - } - } - }, - "v0AddSettingToBundleRequest": { - "type": "object", - "properties": { - "bundleId": { - "type": "string" - }, - "setting": { - "$ref": "#/definitions/v0Setting" - } - } - }, - "v0AddSettingToBundleResponse": { - "type": "object", - "properties": { - "setting": { - "$ref": "#/definitions/v0Setting" - } - } - }, - "v0AssignRoleToUserRequest": { - "type": "object", - "properties": { - "accountUuid": { - "type": "string" - }, - "roleId": { - "type": "string", - "title": "the role_id is a bundle_id internally" - } - } - }, - "v0AssignRoleToUserResponse": { - "type": "object", - "properties": { - "assignment": { - "$ref": "#/definitions/v0UserRoleAssignment" - } - } - }, - "v0Bool": { - "type": "object", - "properties": { - "default": { - "type": "boolean" - }, - "label": { - "type": "string" - } - } - }, - "v0Bundle": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v0BundleType" - }, - "extension": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "settings": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Setting" - } - }, - "resource": { - "$ref": "#/definitions/v0Resource" - } - } - }, - "v0BundleType": { - "type": "string", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DEFAULT", - "TYPE_ROLE" - ], - "default": "TYPE_UNKNOWN" - }, - "v0GetBundleRequest": { - "type": "object", - "properties": { - "bundleId": { - "type": "string" - } - } - }, - "v0GetBundleResponse": { - "type": "object", - "properties": { - "bundle": { - "$ref": "#/definitions/v0Bundle" - } - } - }, - "v0GetPermissionByIDRequest": { - "type": "object", - "properties": { - "permissionId": { - "type": "string" - } - } - }, - "v0GetPermissionByIDResponse": { - "type": "object", - "properties": { - "permission": { - "$ref": "#/definitions/v0Permission" - } - } - }, - "v0GetValueByUniqueIdentifiersRequest": { - "type": "object", - "properties": { - "accountUuid": { - "type": "string" - }, - "settingId": { - "type": "string" - } - } - }, - "v0GetValueRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0GetValueResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/v0ValueWithIdentifier" - } - } - }, - "v0Identifier": { - "type": "object", - "properties": { - "extension": { - "type": "string" - }, - "bundle": { - "type": "string" - }, - "setting": { - "type": "string" - } - } - }, - "v0Int": { - "type": "object", - "properties": { - "default": { - "type": "string", - "format": "int64" - }, - "min": { - "type": "string", - "format": "int64" - }, - "max": { - "type": "string", - "format": "int64" - }, - "step": { - "type": "string", - "format": "int64" - }, - "placeholder": { - "type": "string" - } - } - }, - "v0ListBundlesRequest": { - "type": "object", - "properties": { - "bundleIds": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v0ListBundlesResponse": { - "type": "object", - "properties": { - "bundles": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Bundle" - } - } - } - }, - "v0ListOption": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/v0ListOptionValue" - }, - "default": { - "type": "boolean" - }, - "displayValue": { - "type": "string" - } - } - }, - "v0ListOptionValue": { - "type": "object", - "properties": { - "stringValue": { - "type": "string" - }, - "intValue": { - "type": "string", - "format": "int64" - } - } - }, - "v0ListPermissionsByResourceRequest": { - "type": "object", - "properties": { - "resource": { - "$ref": "#/definitions/v0Resource" - } - } - }, - "v0ListPermissionsByResourceResponse": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Permission" - } - } - } - }, - "v0ListRoleAssignmentsRequest": { - "type": "object", - "properties": { - "accountUuid": { - "type": "string" - } - } - }, - "v0ListRoleAssignmentsResponse": { - "type": "object", - "properties": { - "assignments": { - "type": "array", - "items": { - "$ref": "#/definitions/v0UserRoleAssignment" - } - } - } - }, - "v0ListValuesRequest": { - "type": "object", - "properties": { - "bundleId": { - "type": "string" - }, - "accountUuid": { - "type": "string" - } - } - }, - "v0ListValuesResponse": { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "$ref": "#/definitions/v0ValueWithIdentifier" - } - } - } - }, - "v0MultiChoiceList": { - "type": "object", - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/v0ListOption" - } - } - } - }, - "v0Permission": { - "type": "object", - "properties": { - "operation": { - "$ref": "#/definitions/v0PermissionOperation" - }, - "constraint": { - "$ref": "#/definitions/PermissionConstraint" - } - } - }, - "v0PermissionOperation": { - "type": "string", - "enum": [ - "OPERATION_UNKNOWN", - "OPERATION_CREATE", - "OPERATION_READ", - "OPERATION_UPDATE", - "OPERATION_DELETE", - "OPERATION_WRITE", - "OPERATION_READWRITE" - ], - "default": "OPERATION_UNKNOWN" - }, - "v0RemoveRoleFromUserRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0RemoveSettingFromBundleRequest": { - "type": "object", - "properties": { - "bundleId": { - "type": "string" - }, - "settingId": { - "type": "string" - } - } - }, - "v0Resource": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/v0ResourceType" - }, - "id": { - "type": "string" - } - } - }, - "v0ResourceType": { - "type": "string", - "enum": [ - "TYPE_UNKNOWN", - "TYPE_SYSTEM", - "TYPE_FILE", - "TYPE_SHARE", - "TYPE_SETTING", - "TYPE_BUNDLE", - "TYPE_USER", - "TYPE_GROUP" - ], - "default": "TYPE_UNKNOWN" - }, - "v0SaveBundleRequest": { - "type": "object", - "properties": { - "bundle": { - "$ref": "#/definitions/v0Bundle" - } - }, - "title": "---\nrequests and responses for settings bundles\n---" - }, - "v0SaveBundleResponse": { - "type": "object", - "properties": { - "bundle": { - "$ref": "#/definitions/v0Bundle" - } - } - }, - "v0SaveValueRequest": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/settingsv0Value" - } - } - }, - "v0SaveValueResponse": { - "type": "object", - "properties": { - "value": { - "$ref": "#/definitions/v0ValueWithIdentifier" - } - } - }, - "v0Setting": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "description": { - "type": "string" - }, - "intValue": { - "$ref": "#/definitions/v0Int" - }, - "stringValue": { - "$ref": "#/definitions/v0String" - }, - "boolValue": { - "$ref": "#/definitions/v0Bool" - }, - "singleChoiceValue": { - "$ref": "#/definitions/v0SingleChoiceList" - }, - "multiChoiceValue": { - "$ref": "#/definitions/v0MultiChoiceList" - }, - "permissionValue": { - "$ref": "#/definitions/v0Permission" - }, - "resource": { - "$ref": "#/definitions/v0Resource" - } - } - }, - "v0SingleChoiceList": { - "type": "object", - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/definitions/v0ListOption" - } - } - } - }, - "v0String": { - "type": "object", - "properties": { - "default": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "minLength": { - "type": "integer", - "format": "int32" - }, - "maxLength": { - "type": "integer", - "format": "int32" - }, - "placeholder": { - "type": "string" - } - } - }, - "v0UserRoleAssignment": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "id is generated upon saving the assignment" - }, - "accountUuid": { - "type": "string" - }, - "roleId": { - "type": "string", - "title": "the role_id is a bundle_id internally" - } - } - }, - "v0ValueWithIdentifier": { - "type": "object", - "properties": { - "identifier": { - "$ref": "#/definitions/v0Identifier" - }, - "value": { - "$ref": "#/definitions/settingsv0Value" - } - } - } - }, - "externalDocs": { - "description": "Developer Manual", - "url": "https://owncloud.dev/extensions/settings/" - } -} diff --git a/settings/pkg/server/grpc/server.go b/settings/pkg/server/grpc/server.go index 2b8fde17005..409f440296d 100644 --- a/settings/pkg/server/grpc/server.go +++ b/settings/pkg/server/grpc/server.go @@ -6,7 +6,7 @@ import ( permissions "github.com/cs3org/go-cs3apis/cs3/permissions/v1beta1" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" svc "github.com/owncloud/ocis/settings/pkg/service/v0" "go-micro.dev/v4/api" "go-micro.dev/v4/server" @@ -27,16 +27,16 @@ func Server(opts ...Option) grpc.Service { ) handle := svc.NewService(options.Config, options.Logger) - if err := proto.RegisterBundleServiceHandler(service.Server(), handle); err != nil { + if err := settingssvc.RegisterBundleServiceHandler(service.Server(), handle); err != nil { options.Logger.Fatal().Err(err).Msg("could not register Bundle service handler") } - if err := proto.RegisterValueServiceHandler(service.Server(), handle); err != nil { + if err := settingssvc.RegisterValueServiceHandler(service.Server(), handle); err != nil { options.Logger.Fatal().Err(err).Msg("could not register Value service handler") } - if err := proto.RegisterRoleServiceHandler(service.Server(), handle); err != nil { + if err := settingssvc.RegisterRoleServiceHandler(service.Server(), handle); err != nil { options.Logger.Fatal().Err(err).Msg("could not register Role service handler") } - if err := proto.RegisterPermissionServiceHandler(service.Server(), handle); err != nil { + if err := settingssvc.RegisterPermissionServiceHandler(service.Server(), handle); err != nil { options.Logger.Fatal().Err(err).Msg("could not register Permission service handler") } diff --git a/settings/pkg/server/http/server.go b/settings/pkg/server/http/server.go index 29795d78f95..1f693334b83 100644 --- a/settings/pkg/server/http/server.go +++ b/settings/pkg/server/http/server.go @@ -8,8 +8,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/http" "github.com/owncloud/ocis/ocis-pkg/version" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/owncloud/ocis/settings/pkg/assets" - "github.com/owncloud/ocis/settings/pkg/proto/v0" svc "github.com/owncloud/ocis/settings/pkg/service/v0" "go-micro.dev/v4" ) @@ -73,10 +73,10 @@ func Server(opts ...Option) http.Service { )) mux.Route(options.Config.HTTP.Root, func(r chi.Router) { - proto.RegisterBundleServiceWeb(r, handle) - proto.RegisterValueServiceWeb(r, handle) - proto.RegisterRoleServiceWeb(r, handle) - proto.RegisterPermissionServiceWeb(r, handle) + settingssvc.RegisterBundleServiceWeb(r, handle) + settingssvc.RegisterValueServiceWeb(r, handle) + settingssvc.RegisterRoleServiceWeb(r, handle) + settingssvc.RegisterPermissionServiceWeb(r, handle) }) micro.RegisterHandler(service.Server(), mux) diff --git a/settings/pkg/service/v0/permissions.go b/settings/pkg/service/v0/permissions.go index 72bfe282b7e..4ed01d30dc9 100644 --- a/settings/pkg/service/v0/permissions.go +++ b/settings/pkg/service/v0/permissions.go @@ -1,12 +1,14 @@ package svc -import "github.com/owncloud/ocis/settings/pkg/proto/v0" +import ( + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" +) func (g Service) hasPermission( roleIDs []string, - resource *proto.Resource, - operations []proto.Permission_Operation, - constraint proto.Permission_Constraint, + resource *settingsmsg.Resource, + operations []settingsmsg.Permission_Operation, + constraint settingsmsg.Permission_Constraint, ) bool { permissions, err := g.manager.ListPermissionsByResource(resource, roleIDs) if err != nil { @@ -21,8 +23,8 @@ func (g Service) hasPermission( } // filterPermissionsByOperations returns the subset of the given permissions, where at least one of the given operations is fulfilled. -func getFilteredPermissionsByOperations(permissions []*proto.Permission, operations []proto.Permission_Operation) []*proto.Permission { - var filteredPermissions []*proto.Permission +func getFilteredPermissionsByOperations(permissions []*settingsmsg.Permission, operations []settingsmsg.Permission_Operation) []*settingsmsg.Permission { + var filteredPermissions []*settingsmsg.Permission for _, permission := range permissions { if isAnyOperationFulfilled(permission, operations) { filteredPermissions = append(filteredPermissions, permission) @@ -32,7 +34,7 @@ func getFilteredPermissionsByOperations(permissions []*proto.Permission, operati } // isAnyOperationFulfilled checks if the permissions is about any of the operations -func isAnyOperationFulfilled(permission *proto.Permission, operations []proto.Permission_Operation) bool { +func isAnyOperationFulfilled(permission *settingsmsg.Permission, operations []settingsmsg.Permission_Operation) bool { for _, operation := range operations { if operation == permission.Operation { return true @@ -43,13 +45,13 @@ func isAnyOperationFulfilled(permission *proto.Permission, operations []proto.Pe // isConstraintFulfilled checks if one of the permissions has the same or a parent of the constraint. // this is only a comparison on ENUM level. More sophisticated checks cannot happen here... -func isConstraintFulfilled(permissions []*proto.Permission, constraint proto.Permission_Constraint) bool { +func isConstraintFulfilled(permissions []*settingsmsg.Permission, constraint settingsmsg.Permission_Constraint) bool { for _, permission := range permissions { // comparing enum by order is not a feasible solution, because `SHARED` is not a superset of `OWN`. - if permission.Constraint == proto.Permission_CONSTRAINT_ALL { + if permission.Constraint == settingsmsg.Permission_CONSTRAINT_ALL { return true } - if permission.Constraint != proto.Permission_CONSTRAINT_UNKNOWN && permission.Constraint == constraint { + if permission.Constraint != settingsmsg.Permission_CONSTRAINT_UNKNOWN && permission.Constraint == constraint { return true } } diff --git a/settings/pkg/service/v0/service.go b/settings/pkg/service/v0/service.go index 97f6f222c08..4590b2ce9af 100644 --- a/settings/pkg/service/v0/service.go +++ b/settings/pkg/service/v0/service.go @@ -11,8 +11,9 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/owncloud/ocis/settings/pkg/config" - "github.com/owncloud/ocis/settings/pkg/proto/v0" "github.com/owncloud/ocis/settings/pkg/settings" store "github.com/owncloud/ocis/settings/pkg/store/filesystem" merrors "go-micro.dev/v4/errors" @@ -125,7 +126,7 @@ func (g Service) RegisterDefaultRoles() { // TODO: check permissions on every request // SaveBundle implements the BundleServiceHandler interface -func (g Service) SaveBundle(ctx context.Context, req *proto.SaveBundleRequest, res *proto.SaveBundleResponse) error { +func (g Service) SaveBundle(ctx context.Context, req *settingssvc.SaveBundleRequest, res *settingssvc.SaveBundleResponse) error { cleanUpResource(ctx, req.Bundle.Resource) if err := g.checkStaticPermissionsByBundleType(ctx, req.Bundle.Type); err != nil { return err @@ -143,7 +144,7 @@ func (g Service) SaveBundle(ctx context.Context, req *proto.SaveBundleRequest, r } // GetBundle implements the BundleServiceHandler interface -func (g Service) GetBundle(ctx context.Context, req *proto.GetBundleRequest, res *proto.GetBundleResponse) error { +func (g Service) GetBundle(ctx context.Context, req *settingssvc.GetBundleRequest, res *settingssvc.GetBundleResponse) error { if validationError := validateGetBundle(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } @@ -161,19 +162,19 @@ func (g Service) GetBundle(ctx context.Context, req *proto.GetBundleRequest, res } // ListBundles implements the BundleServiceHandler interface -func (g Service) ListBundles(ctx context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error { +func (g Service) ListBundles(ctx context.Context, req *settingssvc.ListBundlesRequest, res *settingssvc.ListBundlesResponse) error { // fetch all bundles if validationError := validateListBundles(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } - bundles, err := g.manager.ListBundles(proto.Bundle_TYPE_DEFAULT, req.BundleIds) + bundles, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, req.BundleIds) if err != nil { return merrors.NotFound(g.id, "%s", err) } roleIDs := g.getRoleIDs(ctx) // filter settings in bundles that are allowed according to roles - var filteredBundles []*proto.Bundle + var filteredBundles []*settingsmsg.Bundle for _, bundle := range bundles { filteredBundle := g.getFilteredBundle(roleIDs, bundle) if len(filteredBundle.Settings) > 0 { @@ -185,33 +186,33 @@ func (g Service) ListBundles(ctx context.Context, req *proto.ListBundlesRequest, return nil } -func (g Service) getFilteredBundle(roleIDs []string, bundle *proto.Bundle) *proto.Bundle { +func (g Service) getFilteredBundle(roleIDs []string, bundle *settingsmsg.Bundle) *settingsmsg.Bundle { // check if full bundle is whitelisted - bundleResource := &proto.Resource{ - Type: proto.Resource_TYPE_BUNDLE, + bundleResource := &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_BUNDLE, Id: bundle.Id, } if g.hasPermission( roleIDs, bundleResource, - []proto.Permission_Operation{proto.Permission_OPERATION_READ, proto.Permission_OPERATION_READWRITE}, - proto.Permission_CONSTRAINT_OWN, + []settingsmsg.Permission_Operation{settingsmsg.Permission_OPERATION_READ, settingsmsg.Permission_OPERATION_READWRITE}, + settingsmsg.Permission_CONSTRAINT_OWN, ) { return bundle } // filter settings based on permissions - var filteredSettings []*proto.Setting + var filteredSettings []*settingsmsg.Setting for _, setting := range bundle.Settings { - settingResource := &proto.Resource{ - Type: proto.Resource_TYPE_SETTING, + settingResource := &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, Id: setting.Id, } if g.hasPermission( roleIDs, settingResource, - []proto.Permission_Operation{proto.Permission_OPERATION_READ, proto.Permission_OPERATION_READWRITE}, - proto.Permission_CONSTRAINT_OWN, + []settingsmsg.Permission_Operation{settingsmsg.Permission_OPERATION_READ, settingsmsg.Permission_OPERATION_READWRITE}, + settingsmsg.Permission_CONSTRAINT_OWN, ) { filteredSettings = append(filteredSettings, setting) } @@ -221,7 +222,7 @@ func (g Service) getFilteredBundle(roleIDs []string, bundle *proto.Bundle) *prot } // AddSettingToBundle implements the BundleServiceHandler interface -func (g Service) AddSettingToBundle(ctx context.Context, req *proto.AddSettingToBundleRequest, res *proto.AddSettingToBundleResponse) error { +func (g Service) AddSettingToBundle(ctx context.Context, req *settingssvc.AddSettingToBundleRequest, res *settingssvc.AddSettingToBundleResponse) error { cleanUpResource(ctx, req.Setting.Resource) if err := g.checkStaticPermissionsByBundleID(ctx, req.BundleId); err != nil { return err @@ -239,7 +240,7 @@ func (g Service) AddSettingToBundle(ctx context.Context, req *proto.AddSettingTo } // RemoveSettingFromBundle implements the BundleServiceHandler interface -func (g Service) RemoveSettingFromBundle(ctx context.Context, req *proto.RemoveSettingFromBundleRequest, _ *emptypb.Empty) error { +func (g Service) RemoveSettingFromBundle(ctx context.Context, req *settingssvc.RemoveSettingFromBundleRequest, _ *emptypb.Empty) error { if err := g.checkStaticPermissionsByBundleID(ctx, req.BundleId); err != nil { return err } @@ -255,7 +256,7 @@ func (g Service) RemoveSettingFromBundle(ctx context.Context, req *proto.RemoveS } // SaveValue implements the ValueServiceHandler interface -func (g Service) SaveValue(ctx context.Context, req *proto.SaveValueRequest, res *proto.SaveValueResponse) error { +func (g Service) SaveValue(ctx context.Context, req *settingssvc.SaveValueRequest, res *settingssvc.SaveValueResponse) error { req.Value.AccountUuid = getValidatedAccountUUID(ctx, req.Value.AccountUuid) cleanUpResource(ctx, req.Value.Resource) // TODO: we need to check, if the authenticated user has permission to write the value for the specified resource (e.g. global, file with id xy, ...) @@ -275,7 +276,7 @@ func (g Service) SaveValue(ctx context.Context, req *proto.SaveValueRequest, res } // GetValue implements the ValueServiceHandler interface -func (g Service) GetValue(ctx context.Context, req *proto.GetValueRequest, res *proto.GetValueResponse) error { +func (g Service) GetValue(ctx context.Context, req *settingssvc.GetValueRequest, res *settingssvc.GetValueResponse) error { if validationError := validateGetValue(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } @@ -292,7 +293,7 @@ func (g Service) GetValue(ctx context.Context, req *proto.GetValueRequest, res * } // GetValueByUniqueIdentifiers implements the ValueService interface -func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *proto.GetValueByUniqueIdentifiersRequest, res *proto.GetValueResponse) error { +func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *settingssvc.GetValueByUniqueIdentifiersRequest, res *settingssvc.GetValueResponse) error { if validationError := validateGetValueByUniqueIdentifiers(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } @@ -313,7 +314,7 @@ func (g Service) GetValueByUniqueIdentifiers(ctx context.Context, req *proto.Get } // ListValues implements the ValueServiceHandler interface -func (g Service) ListValues(ctx context.Context, req *proto.ListValuesRequest, res *proto.ListValuesResponse) error { +func (g Service) ListValues(ctx context.Context, req *settingssvc.ListValuesRequest, res *settingssvc.ListValuesResponse) error { req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid) if validationError := validateListValues(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) @@ -322,7 +323,7 @@ func (g Service) ListValues(ctx context.Context, req *proto.ListValuesRequest, r if err != nil { return merrors.NotFound(g.id, "%s", err) } - var result []*proto.ValueWithIdentifier + var result []*settingsmsg.ValueWithIdentifier for _, value := range r { valueWithIdentifier, err := g.getValueWithIdentifier(value) if err == nil { @@ -334,12 +335,12 @@ func (g Service) ListValues(ctx context.Context, req *proto.ListValuesRequest, r } // ListRoles implements the RoleServiceHandler interface -func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, res *proto.ListBundlesResponse) error { +func (g Service) ListRoles(c context.Context, req *settingssvc.ListBundlesRequest, res *settingssvc.ListBundlesResponse) error { //accountUUID := getValidatedAccountUUID(c, "me") if validationError := validateListRoles(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } - r, err := g.manager.ListBundles(proto.Bundle_TYPE_ROLE, req.BundleIds) + r, err := g.manager.ListBundles(settingsmsg.Bundle_TYPE_ROLE, req.BundleIds) if err != nil { return merrors.NotFound(g.id, "%s", err) } @@ -349,7 +350,7 @@ func (g Service) ListRoles(c context.Context, req *proto.ListBundlesRequest, res } // ListRoleAssignments implements the RoleServiceHandler interface -func (g Service) ListRoleAssignments(ctx context.Context, req *proto.ListRoleAssignmentsRequest, res *proto.ListRoleAssignmentsResponse) error { +func (g Service) ListRoleAssignments(ctx context.Context, req *settingssvc.ListRoleAssignmentsRequest, res *settingssvc.ListRoleAssignmentsResponse) error { req.AccountUuid = getValidatedAccountUUID(ctx, req.AccountUuid) if validationError := validateListRoleAssignments(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) @@ -363,8 +364,8 @@ func (g Service) ListRoleAssignments(ctx context.Context, req *proto.ListRoleAss } // AssignRoleToUser implements the RoleServiceHandler interface -func (g Service) AssignRoleToUser(ctx context.Context, req *proto.AssignRoleToUserRequest, res *proto.AssignRoleToUserResponse) error { - if err := g.checkStaticPermissionsByBundleType(ctx, proto.Bundle_TYPE_ROLE); err != nil { +func (g Service) AssignRoleToUser(ctx context.Context, req *settingssvc.AssignRoleToUserRequest, res *settingssvc.AssignRoleToUserResponse) error { + if err := g.checkStaticPermissionsByBundleType(ctx, settingsmsg.Bundle_TYPE_ROLE); err != nil { return err } @@ -381,8 +382,8 @@ func (g Service) AssignRoleToUser(ctx context.Context, req *proto.AssignRoleToUs } // RemoveRoleFromUser implements the RoleServiceHandler interface -func (g Service) RemoveRoleFromUser(ctx context.Context, req *proto.RemoveRoleFromUserRequest, _ *emptypb.Empty) error { - if err := g.checkStaticPermissionsByBundleType(ctx, proto.Bundle_TYPE_ROLE); err != nil { +func (g Service) RemoveRoleFromUser(ctx context.Context, req *settingssvc.RemoveRoleFromUserRequest, _ *emptypb.Empty) error { + if err := g.checkStaticPermissionsByBundleType(ctx, settingsmsg.Bundle_TYPE_ROLE); err != nil { return err } @@ -396,7 +397,7 @@ func (g Service) RemoveRoleFromUser(ctx context.Context, req *proto.RemoveRoleFr } // ListPermissionsByResource implements the PermissionServiceHandler interface -func (g Service) ListPermissionsByResource(ctx context.Context, req *proto.ListPermissionsByResourceRequest, res *proto.ListPermissionsByResourceResponse) error { +func (g Service) ListPermissionsByResource(ctx context.Context, req *settingssvc.ListPermissionsByResourceRequest, res *settingssvc.ListPermissionsByResourceResponse) error { if validationError := validateListPermissionsByResource(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } @@ -409,7 +410,7 @@ func (g Service) ListPermissionsByResource(ctx context.Context, req *proto.ListP } // GetPermissionByID implements the PermissionServiceHandler interface -func (g Service) GetPermissionByID(ctx context.Context, req *proto.GetPermissionByIDRequest, res *proto.GetPermissionByIDResponse) error { +func (g Service) GetPermissionByID(ctx context.Context, req *settingssvc.GetPermissionByIDRequest, res *settingssvc.GetPermissionByIDResponse) error { if validationError := validateGetPermissionByID(req); validationError != nil { return merrors.BadRequest(g.id, "%s", validationError) } @@ -425,8 +426,8 @@ func (g Service) GetPermissionByID(ctx context.Context, req *proto.GetPermission } // cleanUpResource makes sure that the account uuid of the authenticated user is injected if needed. -func cleanUpResource(ctx context.Context, resource *proto.Resource) { - if resource != nil && resource.Type == proto.Resource_TYPE_USER { +func cleanUpResource(ctx context.Context, resource *settingsmsg.Resource) { + if resource != nil && resource.Type == settingsmsg.Resource_TYPE_USER { resource.Id = getValidatedAccountUUID(ctx, resource.Id) } } @@ -454,7 +455,7 @@ func (g Service) getRoleIDs(ctx context.Context) []string { return []string{} } -func (g Service) getValueWithIdentifier(value *proto.Value) (*proto.ValueWithIdentifier, error) { +func (g Service) getValueWithIdentifier(value *settingsmsg.Value) (*settingsmsg.ValueWithIdentifier, error) { bundle, err := g.manager.ReadBundle(value.BundleId) if err != nil { return nil, err @@ -463,8 +464,8 @@ func (g Service) getValueWithIdentifier(value *proto.Value) (*proto.ValueWithIde if err != nil { return nil, err } - return &proto.ValueWithIdentifier{ - Identifier: &proto.Identifier{ + return &settingsmsg.ValueWithIdentifier{ + Identifier: &settingsmsg.Identifier{ Extension: bundle.Extension, Bundle: bundle.Name, Setting: setting.Name, @@ -499,8 +500,8 @@ func (g Service) checkStaticPermissionsByBundleID(ctx context.Context, bundleID return g.checkStaticPermissionsByBundleType(ctx, bundle.Type) } -func (g Service) checkStaticPermissionsByBundleType(ctx context.Context, bundleType proto.Bundle_Type) error { - if bundleType == proto.Bundle_TYPE_ROLE { +func (g Service) checkStaticPermissionsByBundleType(ctx context.Context, bundleType settingsmsg.Bundle_Type) error { + if bundleType == settingsmsg.Bundle_TYPE_ROLE { if !g.hasStaticPermission(ctx, RoleManagementPermissionID) { return merrors.Forbidden(g.id, "user has no role management permission") } diff --git a/settings/pkg/service/v0/settings.go b/settings/pkg/service/v0/settings.go index 38bae76e998..902dcd9a3e6 100644 --- a/settings/pkg/service/v0/settings.go +++ b/settings/pkg/service/v0/settings.go @@ -1,7 +1,8 @@ package svc import ( - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) const ( @@ -56,8 +57,8 @@ const ( ) // generateBundlesDefaultRoles bootstraps the default roles. -func generateBundlesDefaultRoles() []*settings.Bundle { - return []*settings.Bundle{ +func generateBundlesDefaultRoles() []*settingsmsg.Bundle { + return []*settingsmsg.Bundle{ generateBundleAdminRole(), generateBundleUserRole(), generateBundleGuestRole(), @@ -65,70 +66,70 @@ func generateBundlesDefaultRoles() []*settings.Bundle { } } -func generateBundleAdminRole() *settings.Bundle { - return &settings.Bundle{ +func generateBundleAdminRole() *settingsmsg.Bundle { + return &settingsmsg.Bundle{ Id: BundleUUIDRoleAdmin, Name: "admin", - Type: settings.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, Extension: "ocis-roles", DisplayName: "Admin", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{}, + Settings: []*settingsmsg.Setting{}, } } -func generateBundleUserRole() *settings.Bundle { - return &settings.Bundle{ +func generateBundleUserRole() *settingsmsg.Bundle { + return &settingsmsg.Bundle{ Id: BundleUUIDRoleUser, Name: "user", - Type: settings.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, Extension: "ocis-roles", DisplayName: "User", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{}, + Settings: []*settingsmsg.Setting{}, } } -func generateBundleGuestRole() *settings.Bundle { - return &settings.Bundle{ +func generateBundleGuestRole() *settingsmsg.Bundle { + return &settingsmsg.Bundle{ Id: BundleUUIDRoleGuest, Name: "guest", - Type: settings.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, Extension: "ocis-roles", DisplayName: "Guest", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*settings.Setting{}, + Settings: []*settingsmsg.Setting{}, } } -var languageSetting = settings.Setting_SingleChoiceValue{ - SingleChoiceValue: &settings.SingleChoiceList{ - Options: []*settings.ListOption{ +var languageSetting = settingsmsg.Setting_SingleChoiceValue{ + SingleChoiceValue: &settingsmsg.SingleChoiceList{ + Options: []*settingsmsg.ListOption{ { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "cs", }, }, DisplayValue: "Czech", }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "de", }, }, DisplayValue: "Deutsch", }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "en", }, }, @@ -136,32 +137,32 @@ var languageSetting = settings.Setting_SingleChoiceValue{ Default: true, }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "es", }, }, DisplayValue: "Español", }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "fr", }, }, DisplayValue: "Français", }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "gl", }, }, DisplayValue: "Galego", }, { - Value: &settings.ListOptionValue{ - Option: &settings.ListOptionValue_StringValue{ + Value: &settingsmsg.ListOptionValue{ + Option: &settingsmsg.ListOptionValue_StringValue{ StringValue: "it", }, }, @@ -171,24 +172,24 @@ var languageSetting = settings.Setting_SingleChoiceValue{ }, } -func generateBundleProfileRequest() *settings.Bundle { - return &settings.Bundle{ +func generateBundleProfileRequest() *settingsmsg.Bundle { + return &settingsmsg.Bundle{ Id: "2a506de7-99bd-4f0d-994e-c38e72c28fd9", Name: "profile", Extension: "ocis-accounts", - Type: settings.Bundle_TYPE_DEFAULT, - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Type: settingsmsg.Bundle_TYPE_DEFAULT, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, DisplayName: "Profile", - Settings: []*settings.Setting{ + Settings: []*settingsmsg.Setting{ { Id: settingUUIDProfileLanguage, Name: "language", DisplayName: "Language", Description: "User language", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, }, Value: &languageSetting, }, @@ -196,207 +197,207 @@ func generateBundleProfileRequest() *settings.Bundle { } } -func generatePermissionRequests() []*settings.AddSettingToBundleRequest { - return []*settings.AddSettingToBundleRequest{ +func generatePermissionRequests() []*settingssvc.AddSettingToBundleRequest { + return []*settingssvc.AddSettingToBundleRequest{ { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: RoleManagementPermissionID, Name: RoleManagementPermissionName, DisplayName: "Role Management", Description: "This permission gives full access to everything that is related to role management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: SettingsManagementPermissionID, Name: SettingsManagementPermissionName, DisplayName: "Settings Management", Description: "This permission gives full access to everything that is related to settings management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: "7d81f103-0488-4853-bce5-98dcce36d649", Name: "language-readwrite", DisplayName: "Permission to read and set the language (anyone)", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SETTING, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, Id: settingUUIDProfileLanguage, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleUser, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: "640e00d2-4df8-41bd-b1c2-9f30a01e0e99", Name: "language-readwrite", DisplayName: "Permission to read and set the language (self)", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SETTING, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, Id: settingUUIDProfileLanguage, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_OWN, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, }, }, }, }, { BundleId: BundleUUIDRoleGuest, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: "ca878636-8b1a-4fae-8282-8617a4c13597", Name: "language-readwrite", DisplayName: "Permission to read and set the language (self)", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SETTING, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, Id: settingUUIDProfileLanguage, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_OWN, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: AccountManagementPermissionID, Name: AccountManagementPermissionName, DisplayName: "Account Management", Description: "This permission gives full access to everything that is related to account management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: GroupManagementPermissionID, Name: GroupManagementPermissionName, DisplayName: "Group Management", Description: "This permission gives full access to everything that is related to group management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_GROUP, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_GROUP, Id: "all", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleUser, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: SelfManagementPermissionID, Name: SelfManagementPermissionName, DisplayName: "Self Management", Description: "This permission gives access to self management.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_USER, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "me", }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_OWN, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: SetSpaceQuotaPermissionID, Name: SetSpaceQuotaPermissionName, DisplayName: "Set Space Quota", Description: "This permission allows to manage space quotas.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: CreateSpacePermissionID, Name: CreateSpacePermissionName, DisplayName: "Create Space", Description: "This permission allows to create new spaces.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READWRITE, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READWRITE, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, }, { BundleId: BundleUUIDRoleAdmin, - Setting: &settings.Setting{ + Setting: &settingsmsg.Setting{ Id: ListAllSpacesPermissionID, Name: ListAllSpacesPermissionName, DisplayName: "List All Spaces", Description: "This permission allows list all spaces.", - Resource: &settings.Resource{ - Type: settings.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Value: &settings.Setting_PermissionValue{ - PermissionValue: &settings.Permission{ - Operation: settings.Permission_OPERATION_READ, - Constraint: settings.Permission_CONSTRAINT_ALL, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READ, + Constraint: settingsmsg.Permission_CONSTRAINT_ALL, }, }, }, @@ -404,8 +405,8 @@ func generatePermissionRequests() []*settings.AddSettingToBundleRequest { } } -func defaultRoleAssignments() []*settings.UserRoleAssignment { - return []*settings.UserRoleAssignment{ +func defaultRoleAssignments() []*settingsmsg.UserRoleAssignment { + return []*settingsmsg.UserRoleAssignment{ // default admin users { AccountUuid: "058bff95-6708-4fe5-91e4-9ea3d377588b", diff --git a/settings/pkg/service/v0/validator.go b/settings/pkg/service/v0/validator.go index 246b71c6653..3f66e12d08d 100644 --- a/settings/pkg/service/v0/validator.go +++ b/settings/pkg/service/v0/validator.go @@ -5,7 +5,8 @@ import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ) var ( @@ -22,12 +23,12 @@ var ( } ) -func validateSaveBundle(req *proto.SaveBundleRequest) error { +func validateSaveBundle(req *settingssvc.SaveBundleRequest) error { if err := validation.ValidateStruct( req.Bundle, validation.Field(&req.Bundle.Id, validation.When(req.Bundle.Id != "", is.UUID)), validation.Field(&req.Bundle.Name, requireAlphanumeric...), - validation.Field(&req.Bundle.Type, validation.NotIn(proto.Bundle_TYPE_UNKNOWN)), + validation.Field(&req.Bundle.Type, validation.NotIn(settingsmsg.Bundle_TYPE_UNKNOWN)), validation.Field(&req.Bundle.Extension, requireAlphanumeric...), validation.Field(&req.Bundle.DisplayName, validation.Required), validation.Field(&req.Bundle.Settings, validation.Required), @@ -45,22 +46,22 @@ func validateSaveBundle(req *proto.SaveBundleRequest) error { return nil } -func validateGetBundle(req *proto.GetBundleRequest) error { +func validateGetBundle(req *settingssvc.GetBundleRequest) error { return validation.Validate(&req.BundleId, is.UUID) } -func validateListBundles(req *proto.ListBundlesRequest) error { +func validateListBundles(req *settingssvc.ListBundlesRequest) error { return nil } -func validateAddSettingToBundle(req *proto.AddSettingToBundleRequest) error { +func validateAddSettingToBundle(req *settingssvc.AddSettingToBundleRequest) error { if err := validation.ValidateStruct(req, validation.Field(&req.BundleId, is.UUID)); err != nil { return err } return validateSetting(req.Setting) } -func validateRemoveSettingFromBundle(req *proto.RemoveSettingFromBundleRequest) error { +func validateRemoveSettingFromBundle(req *settingssvc.RemoveSettingFromBundleRequest) error { return validation.ValidateStruct( req, validation.Field(&req.BundleId, is.UUID), @@ -68,7 +69,7 @@ func validateRemoveSettingFromBundle(req *proto.RemoveSettingFromBundleRequest) ) } -func validateSaveValue(req *proto.SaveValueRequest) error { +func validateSaveValue(req *settingssvc.SaveValueRequest) error { if err := validation.ValidateStruct( req.Value, validation.Field(&req.Value.Id, validation.When(req.Value.Id != "", is.UUID)), @@ -87,11 +88,11 @@ func validateSaveValue(req *proto.SaveValueRequest) error { return nil } -func validateGetValue(req *proto.GetValueRequest) error { +func validateGetValue(req *settingssvc.GetValueRequest) error { return validation.Validate(req.Id, is.UUID) } -func validateGetValueByUniqueIdentifiers(req *proto.GetValueByUniqueIdentifiersRequest) error { +func validateGetValueByUniqueIdentifiers(req *settingssvc.GetValueByUniqueIdentifiersRequest) error { return validation.ValidateStruct( req, validation.Field(&req.SettingId, is.UUID), @@ -99,7 +100,7 @@ func validateGetValueByUniqueIdentifiers(req *proto.GetValueByUniqueIdentifiersR ) } -func validateListValues(req *proto.ListValuesRequest) error { +func validateListValues(req *settingssvc.ListValuesRequest) error { return validation.ValidateStruct( req, validation.Field(&req.BundleId, validation.When(req.BundleId != "", is.UUID)), @@ -107,15 +108,15 @@ func validateListValues(req *proto.ListValuesRequest) error { ) } -func validateListRoles(req *proto.ListBundlesRequest) error { +func validateListRoles(req *settingssvc.ListBundlesRequest) error { return nil } -func validateListRoleAssignments(req *proto.ListRoleAssignmentsRequest) error { +func validateListRoleAssignments(req *settingssvc.ListRoleAssignmentsRequest) error { return validation.Validate(req.AccountUuid, requireAccountID...) } -func validateAssignRoleToUser(req *proto.AssignRoleToUserRequest) error { +func validateAssignRoleToUser(req *settingssvc.AssignRoleToUserRequest) error { return validation.ValidateStruct( req, validation.Field(&req.AccountUuid, requireAccountID...), @@ -123,18 +124,18 @@ func validateAssignRoleToUser(req *proto.AssignRoleToUserRequest) error { ) } -func validateRemoveRoleFromUser(req *proto.RemoveRoleFromUserRequest) error { +func validateRemoveRoleFromUser(req *settingssvc.RemoveRoleFromUserRequest) error { return validation.ValidateStruct( req, validation.Field(&req.Id, is.UUID), ) } -func validateListPermissionsByResource(req *proto.ListPermissionsByResourceRequest) error { +func validateListPermissionsByResource(req *settingssvc.ListPermissionsByResourceRequest) error { return validateResource(req.Resource) } -func validateGetPermissionByID(req *proto.GetPermissionByIDRequest) error { +func validateGetPermissionByID(req *settingssvc.GetPermissionByIDRequest) error { return validation.ValidateStruct( req, validation.Field(&req.PermissionId, requireAlphanumeric...), @@ -142,15 +143,15 @@ func validateGetPermissionByID(req *proto.GetPermissionByIDRequest) error { } // validateResource is an internal helper for validating the content of a resource. -func validateResource(resource *proto.Resource) error { +func validateResource(resource *settingsmsg.Resource) error { if err := validation.Validate(&resource, validation.Required); err != nil { return err } - return validation.Validate(&resource, validation.NotIn(proto.Resource_TYPE_UNKNOWN)) + return validation.Validate(&resource, validation.NotIn(settingsmsg.Resource_TYPE_UNKNOWN)) } // validateSetting is an internal helper for validating the content of a setting. -func validateSetting(setting *proto.Setting) error { +func validateSetting(setting *settingsmsg.Setting) error { // TODO: make sanity checks, like for int settings, min <= default <= max. if err := validation.ValidateStruct( setting, diff --git a/settings/pkg/settings/settings.go b/settings/pkg/settings/settings.go index da0ff5347f3..81ba4938deb 100644 --- a/settings/pkg/settings/settings.go +++ b/settings/pkg/settings/settings.go @@ -3,8 +3,8 @@ package settings import ( "errors" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/owncloud/ocis/settings/pkg/config" - "github.com/owncloud/ocis/settings/pkg/proto/v0" ) var ( @@ -28,32 +28,32 @@ type Manager interface { // BundleManager is a bundle service interface for abstraction of storage implementations type BundleManager interface { - ListBundles(bundleType proto.Bundle_Type, bundleIDs []string) ([]*proto.Bundle, error) - ReadBundle(bundleID string) (*proto.Bundle, error) - WriteBundle(bundle *proto.Bundle) (*proto.Bundle, error) - ReadSetting(settingID string) (*proto.Setting, error) - AddSettingToBundle(bundleID string, setting *proto.Setting) (*proto.Setting, error) + ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []string) ([]*settingsmsg.Bundle, error) + ReadBundle(bundleID string) (*settingsmsg.Bundle, error) + WriteBundle(bundle *settingsmsg.Bundle) (*settingsmsg.Bundle, error) + ReadSetting(settingID string) (*settingsmsg.Setting, error) + AddSettingToBundle(bundleID string, setting *settingsmsg.Setting) (*settingsmsg.Setting, error) RemoveSettingFromBundle(bundleID, settingID string) error } // ValueManager is a value service interface for abstraction of storage implementations type ValueManager interface { - ListValues(bundleID, accountUUID string) ([]*proto.Value, error) - ReadValue(valueID string) (*proto.Value, error) - ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*proto.Value, error) - WriteValue(value *proto.Value) (*proto.Value, error) + ListValues(bundleID, accountUUID string) ([]*settingsmsg.Value, error) + ReadValue(valueID string) (*settingsmsg.Value, error) + ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*settingsmsg.Value, error) + WriteValue(value *settingsmsg.Value) (*settingsmsg.Value, error) } // RoleAssignmentManager is a role assignment service interface for abstraction of storage implementations type RoleAssignmentManager interface { - ListRoleAssignments(accountUUID string) ([]*proto.UserRoleAssignment, error) - WriteRoleAssignment(accountUUID, roleID string) (*proto.UserRoleAssignment, error) + ListRoleAssignments(accountUUID string) ([]*settingsmsg.UserRoleAssignment, error) + WriteRoleAssignment(accountUUID, roleID string) (*settingsmsg.UserRoleAssignment, error) RemoveRoleAssignment(assignmentID string) error } // PermissionManager is a permissions service interface for abstraction of storage implementations type PermissionManager interface { - ListPermissionsByResource(resource *proto.Resource, roleIDs []string) ([]*proto.Permission, error) - ReadPermissionByID(permissionID string, roleIDs []string) (*proto.Permission, error) - ReadPermissionByName(name string, roleIDs []string) (*proto.Permission, error) + ListPermissionsByResource(resource *settingsmsg.Resource, roleIDs []string) ([]*settingsmsg.Permission, error) + ReadPermissionByID(permissionID string, roleIDs []string) (*settingsmsg.Permission, error) + ReadPermissionByName(name string, roleIDs []string) (*settingsmsg.Permission, error) } diff --git a/settings/pkg/store/filesystem/assignments.go b/settings/pkg/store/filesystem/assignments.go index c1e458c71e1..9ce9e0af32c 100644 --- a/settings/pkg/store/filesystem/assignments.go +++ b/settings/pkg/store/filesystem/assignments.go @@ -7,12 +7,12 @@ import ( "path/filepath" "github.com/gofrs/uuid" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" ) // ListRoleAssignments loads and returns all role assignments matching the given assignment identifier. -func (s Store) ListRoleAssignments(accountUUID string) ([]*proto.UserRoleAssignment, error) { - var records []*proto.UserRoleAssignment +func (s Store) ListRoleAssignments(accountUUID string) ([]*settingsmsg.UserRoleAssignment, error) { + var records []*settingsmsg.UserRoleAssignment assignmentsFolder := s.buildFolderPathForRoleAssignments(false) assignmentFiles, err := ioutil.ReadDir(assignmentsFolder) if err != nil { @@ -20,7 +20,7 @@ func (s Store) ListRoleAssignments(accountUUID string) ([]*proto.UserRoleAssignm } for _, assignmentFile := range assignmentFiles { - record := proto.UserRoleAssignment{} + record := settingsmsg.UserRoleAssignment{} err = s.parseRecordFromFile(&record, filepath.Join(assignmentsFolder, assignmentFile.Name())) if err == nil { if record.AccountUuid == accountUUID { @@ -33,7 +33,7 @@ func (s Store) ListRoleAssignments(accountUUID string) ([]*proto.UserRoleAssignm } // WriteRoleAssignment appends the given role assignment to the existing assignments of the respective account. -func (s Store) WriteRoleAssignment(accountUUID, roleID string) (*proto.UserRoleAssignment, error) { +func (s Store) WriteRoleAssignment(accountUUID, roleID string) (*settingsmsg.UserRoleAssignment, error) { // as per https://github.com/owncloud/product/issues/103 "Each user can have exactly one role" list, err := s.ListRoleAssignments(accountUUID) if err != nil { @@ -46,7 +46,7 @@ func (s Store) WriteRoleAssignment(accountUUID, roleID string) (*proto.UserRoleA } } - assignment := &proto.UserRoleAssignment{ + assignment := &settingsmsg.UserRoleAssignment{ Id: uuid.Must(uuid.NewV4()).String(), AccountUuid: accountUUID, RoleId: roleID, diff --git a/settings/pkg/store/filesystem/assignments_test.go b/settings/pkg/store/filesystem/assignments_test.go index b33782def98..0051d7cc7f6 100644 --- a/settings/pkg/store/filesystem/assignments_test.go +++ b/settings/pkg/store/filesystem/assignments_test.go @@ -8,7 +8,7 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/stretchr/testify/assert" ) @@ -27,30 +27,30 @@ var ( olog.Level("info"), ) - bundles = []*proto.Bundle{ + bundles = []*settingsmsg.Bundle{ { Id: "f36db5e6-a03c-40df-8413-711c67e40b47", - Type: proto.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, DisplayName: "test role - reads | update", Name: "TEST_ROLE", Extension: "ocis-settings", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_BUNDLE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_BUNDLE, }, - Settings: []*proto.Setting{ + Settings: []*settingsmsg.Setting{ { Name: "update", - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_UPDATE, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_UPDATE, }, }, }, { Name: "read", - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_READ, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READ, }, }, }, @@ -58,19 +58,19 @@ var ( }, { Id: "44f1a664-0a7f-461a-b0be-5b59e46bbc7a", - Type: proto.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, DisplayName: "another", Name: "ANOTHER_TEST_ROLE", Extension: "ocis-settings", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_BUNDLE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_BUNDLE, }, - Settings: []*proto.Setting{ + Settings: []*settingsmsg.Setting{ { Name: "read", - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_READ, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READ, }, }, }, diff --git a/settings/pkg/store/filesystem/bundles.go b/settings/pkg/store/filesystem/bundles.go index 33b315ed0aa..d1a63924f08 100644 --- a/settings/pkg/store/filesystem/bundles.go +++ b/settings/pkg/store/filesystem/bundles.go @@ -8,14 +8,14 @@ import ( "sync" "github.com/gofrs/uuid" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/owncloud/ocis/settings/pkg/store/errortypes" ) var m = &sync.RWMutex{} // ListBundles returns all bundles in the dataPath folder that match the given type. -func (s Store) ListBundles(bundleType proto.Bundle_Type, bundleIDs []string) ([]*proto.Bundle, error) { +func (s Store) ListBundles(bundleType settingsmsg.Bundle_Type, bundleIDs []string) ([]*settingsmsg.Bundle, error) { // FIXME: list requests should be ran against a cache, not FS m.RLock() defer m.RUnlock() @@ -23,12 +23,12 @@ func (s Store) ListBundles(bundleType proto.Bundle_Type, bundleIDs []string) ([] bundlesFolder := s.buildFolderPathForBundles(false) bundleFiles, err := ioutil.ReadDir(bundlesFolder) if err != nil { - return []*proto.Bundle{}, nil + return []*settingsmsg.Bundle{}, nil } - records := make([]*proto.Bundle, 0, len(bundleFiles)) + records := make([]*settingsmsg.Bundle, 0, len(bundleFiles)) for _, bundleFile := range bundleFiles { - record := proto.Bundle{} + record := settingsmsg.Bundle{} err = s.parseRecordFromFile(&record, filepath.Join(bundlesFolder, bundleFile.Name())) if err != nil { s.Logger.Warn().Msgf("error reading %v", bundleFile) @@ -57,12 +57,12 @@ func containsStr(str string, strs []string) bool { } // ReadBundle tries to find a bundle by the given id within the dataPath. -func (s Store) ReadBundle(bundleID string) (*proto.Bundle, error) { +func (s Store) ReadBundle(bundleID string) (*settingsmsg.Bundle, error) { m.RLock() defer m.RUnlock() filePath := s.buildFilePathForBundle(bundleID, false) - record := proto.Bundle{} + record := settingsmsg.Bundle{} if err := s.parseRecordFromFile(&record, filePath); err != nil { return nil, err } @@ -72,11 +72,11 @@ func (s Store) ReadBundle(bundleID string) (*proto.Bundle, error) { } // ReadSetting tries to find a setting by the given id within the dataPath. -func (s Store) ReadSetting(settingID string) (*proto.Setting, error) { +func (s Store) ReadSetting(settingID string) (*settingsmsg.Setting, error) { m.RLock() defer m.RUnlock() - bundles, err := s.ListBundles(proto.Bundle_TYPE_DEFAULT, []string{}) + bundles, err := s.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, []string{}) if err != nil { return nil, err } @@ -91,7 +91,7 @@ func (s Store) ReadSetting(settingID string) (*proto.Setting, error) { } // WriteBundle writes the given record into a file within the dataPath. -func (s Store) WriteBundle(record *proto.Bundle) (*proto.Bundle, error) { +func (s Store) WriteBundle(record *settingsmsg.Bundle) (*settingsmsg.Bundle, error) { // FIXME: locking should happen on the file here, not globally. m.Lock() defer m.Unlock() @@ -108,15 +108,15 @@ func (s Store) WriteBundle(record *proto.Bundle) (*proto.Bundle, error) { } // AddSettingToBundle adds the given setting to the bundle with the given bundleID. -func (s Store) AddSettingToBundle(bundleID string, setting *proto.Setting) (*proto.Setting, error) { +func (s Store) AddSettingToBundle(bundleID string, setting *settingsmsg.Setting) (*settingsmsg.Setting, error) { bundle, err := s.ReadBundle(bundleID) if err != nil { if _, notFound := err.(errortypes.BundleNotFound); !notFound { return nil, err } - bundle = new(proto.Bundle) + bundle = new(settingsmsg.Bundle) bundle.Id = bundleID - bundle.Type = proto.Bundle_TYPE_DEFAULT + bundle.Type = settingsmsg.Bundle_TYPE_DEFAULT } if setting.Id == "" { setting.Id = uuid.Must(uuid.NewV4()).String() @@ -145,7 +145,7 @@ func (s Store) RemoveSettingFromBundle(bundleID string, settingID string) error // indexOfSetting finds the index of the given setting within the given bundle. // returns -1 if the setting was not found. -func indexOfSetting(bundle *proto.Bundle, settingID string) int { +func indexOfSetting(bundle *settingsmsg.Bundle, settingID string) int { for index := range bundle.Settings { s := bundle.Settings[index] if s.Id == settingID { @@ -156,7 +156,7 @@ func indexOfSetting(bundle *proto.Bundle, settingID string) int { } // setSetting will append or overwrite the given setting within the given bundle -func setSetting(bundle *proto.Bundle, setting *proto.Setting) { +func setSetting(bundle *settingsmsg.Bundle, setting *settingsmsg.Setting) { m.Lock() defer m.Unlock() index := indexOfSetting(bundle, setting.Id) @@ -168,7 +168,7 @@ func setSetting(bundle *proto.Bundle, setting *proto.Setting) { } // removeSetting will remove the given setting from the given bundle -func removeSetting(bundle *proto.Bundle, settingID string) bool { +func removeSetting(bundle *settingsmsg.Bundle, settingID string) bool { m.Lock() defer m.Unlock() index := indexOfSetting(bundle, settingID) diff --git a/settings/pkg/store/filesystem/bundles_test.go b/settings/pkg/store/filesystem/bundles_test.go index 6539bf6ae3a..096a9b3ddf7 100644 --- a/settings/pkg/store/filesystem/bundles_test.go +++ b/settings/pkg/store/filesystem/bundles_test.go @@ -4,36 +4,36 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/stretchr/testify/assert" ) var bundleScenarios = []struct { name string - bundle *proto.Bundle + bundle *settingsmsg.Bundle }{ { name: "generic-test-file-resource", - bundle: &proto.Bundle{ + bundle: &settingsmsg.Bundle{ Id: bundle1, - Type: proto.Bundle_TYPE_DEFAULT, + Type: settingsmsg.Bundle_TYPE_DEFAULT, Extension: extension1, DisplayName: "test1", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_FILE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_FILE, Id: "beep", }, - Settings: []*proto.Setting{ + Settings: []*settingsmsg.Setting{ { Id: setting1, Description: "test-desc-1", DisplayName: "test-displayname-1", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_FILE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_FILE, Id: "bleep", }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ + Value: &settingsmsg.Setting_IntValue{ + IntValue: &settingsmsg.Int{ Min: 0, Max: 42, }, @@ -44,24 +44,24 @@ var bundleScenarios = []struct { }, { name: "generic-test-system-resource", - bundle: &proto.Bundle{ + bundle: &settingsmsg.Bundle{ Id: bundle2, - Type: proto.Bundle_TYPE_DEFAULT, + Type: settingsmsg.Bundle_TYPE_DEFAULT, Extension: extension2, DisplayName: "test1", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*proto.Setting{ + Settings: []*settingsmsg.Setting{ { Id: setting2, Description: "test-desc-2", DisplayName: "test-displayname-2", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Value: &proto.Setting_IntValue{ - IntValue: &proto.Int{ + Value: &settingsmsg.Setting_IntValue{ + IntValue: &settingsmsg.Int{ Min: 0, Max: 42, }, @@ -72,27 +72,27 @@ var bundleScenarios = []struct { }, { name: "generic-test-role-bundle", - bundle: &proto.Bundle{ + bundle: &settingsmsg.Bundle{ Id: bundle3, - Type: proto.Bundle_TYPE_ROLE, + Type: settingsmsg.Bundle_TYPE_ROLE, Extension: extension1, DisplayName: "Role1", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Settings: []*proto.Setting{ + Settings: []*settingsmsg.Setting{ { Id: setting3, Description: "test-desc-3", DisplayName: "test-displayname-3", - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SETTING, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SETTING, Id: setting1, }, - Value: &proto.Setting_PermissionValue{ - PermissionValue: &proto.Permission{ - Operation: proto.Permission_OPERATION_READ, - Constraint: proto.Permission_CONSTRAINT_OWN, + Value: &settingsmsg.Setting_PermissionValue{ + PermissionValue: &settingsmsg.Permission{ + Operation: settingsmsg.Permission_OPERATION_READ, + Constraint: settingsmsg.Permission_CONSTRAINT_OWN, }, }, }, @@ -124,16 +124,16 @@ func TestBundles(t *testing.T) { } // check that ListBundles only returns bundles with type DEFAULT - bundles, err := s.ListBundles(proto.Bundle_TYPE_DEFAULT, []string{}) + bundles, err := s.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, []string{}) if err != nil { t.Error(err) } for i := range bundles { - assert.Equal(t, proto.Bundle_TYPE_DEFAULT, bundles[i].Type) + assert.Equal(t, settingsmsg.Bundle_TYPE_DEFAULT, bundles[i].Type) } // check that ListBundles filtered by an id only returns that bundle - filteredBundles, err := s.ListBundles(proto.Bundle_TYPE_DEFAULT, []string{bundle2}) + filteredBundles, err := s.ListBundles(settingsmsg.Bundle_TYPE_DEFAULT, []string{bundle2}) if err != nil { t.Error(err) } @@ -143,12 +143,12 @@ func TestBundles(t *testing.T) { } // check that ListRoles only returns bundles with type ROLE - roles, err := s.ListBundles(proto.Bundle_TYPE_ROLE, []string{}) + roles, err := s.ListBundles(settingsmsg.Bundle_TYPE_ROLE, []string{}) if err != nil { t.Error(err) } for i := range roles { - assert.Equal(t, proto.Bundle_TYPE_ROLE, roles[i].Type) + assert.Equal(t, settingsmsg.Bundle_TYPE_ROLE, roles[i].Type) } burnRoot() diff --git a/settings/pkg/store/filesystem/permissions.go b/settings/pkg/store/filesystem/permissions.go index ea63c35904e..49f3c097a8d 100644 --- a/settings/pkg/store/filesystem/permissions.go +++ b/settings/pkg/store/filesystem/permissions.go @@ -1,14 +1,14 @@ package store import ( - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/owncloud/ocis/settings/pkg/settings" "github.com/owncloud/ocis/settings/pkg/util" ) // ListPermissionsByResource collects all permissions from the provided roleIDs that match the requested resource -func (s Store) ListPermissionsByResource(resource *proto.Resource, roleIDs []string) ([]*proto.Permission, error) { - records := make([]*proto.Permission, 0) +func (s Store) ListPermissionsByResource(resource *settingsmsg.Resource, roleIDs []string) ([]*settingsmsg.Permission, error) { + records := make([]*settingsmsg.Permission, 0) for _, roleID := range roleIDs { role, err := s.ReadBundle(roleID) if err != nil { @@ -21,7 +21,7 @@ func (s Store) ListPermissionsByResource(resource *proto.Resource, roleIDs []str } // ReadPermissionByID finds the permission in the roles, specified by the provided roleIDs -func (s Store) ReadPermissionByID(permissionID string, roleIDs []string) (*proto.Permission, error) { +func (s Store) ReadPermissionByID(permissionID string, roleIDs []string) (*settingsmsg.Permission, error) { for _, roleID := range roleIDs { role, err := s.ReadBundle(roleID) if err != nil { @@ -30,7 +30,7 @@ func (s Store) ReadPermissionByID(permissionID string, roleIDs []string) (*proto } for _, permission := range role.Settings { if permission.Id == permissionID { - if value, ok := permission.Value.(*proto.Setting_PermissionValue); ok { + if value, ok := permission.Value.(*settingsmsg.Setting_PermissionValue); ok { return value.PermissionValue, nil } } @@ -40,7 +40,7 @@ func (s Store) ReadPermissionByID(permissionID string, roleIDs []string) (*proto } // ReadPermissionByName finds the permission in the roles, specified by the provided roleIDs -func (s Store) ReadPermissionByName(name string, roleIDs []string) (*proto.Permission, error) { +func (s Store) ReadPermissionByName(name string, roleIDs []string) (*settingsmsg.Permission, error) { for _, roleID := range roleIDs { role, err := s.ReadBundle(roleID) if err != nil { @@ -49,7 +49,7 @@ func (s Store) ReadPermissionByName(name string, roleIDs []string) (*proto.Permi } for _, permission := range role.Settings { if permission.Name == name { - if value, ok := permission.Value.(*proto.Setting_PermissionValue); ok { + if value, ok := permission.Value.(*settingsmsg.Setting_PermissionValue); ok { return value.PermissionValue, nil } } @@ -59,10 +59,10 @@ func (s Store) ReadPermissionByName(name string, roleIDs []string) (*proto.Permi } // extractPermissionsByResource collects all permissions from the provided role that match the requested resource -func extractPermissionsByResource(resource *proto.Resource, role *proto.Bundle) []*proto.Permission { - permissions := make([]*proto.Permission, 0) +func extractPermissionsByResource(resource *settingsmsg.Resource, role *settingsmsg.Bundle) []*settingsmsg.Permission { + permissions := make([]*settingsmsg.Permission, 0) for _, setting := range role.Settings { - if value, ok := setting.Value.(*proto.Setting_PermissionValue); ok { + if value, ok := setting.Value.(*settingsmsg.Setting_PermissionValue); ok { if util.IsResourceMatched(setting.Resource, resource) { permissions = append(permissions, value.PermissionValue) } diff --git a/settings/pkg/store/filesystem/values.go b/settings/pkg/store/filesystem/values.go index 38b5ba1823e..89014f4d3d8 100644 --- a/settings/pkg/store/filesystem/values.go +++ b/settings/pkg/store/filesystem/values.go @@ -7,23 +7,23 @@ import ( "path/filepath" "github.com/gofrs/uuid" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" ) // ListValues reads all values that match the given bundleId and accountUUID. // If the bundleId is empty, it's ignored for filtering. // If the accountUUID is empty, only values with empty accountUUID are returned. // If the accountUUID is not empty, values with an empty or with a matching accountUUID are returned. -func (s Store) ListValues(bundleID, accountUUID string) ([]*proto.Value, error) { +func (s Store) ListValues(bundleID, accountUUID string) ([]*settingsmsg.Value, error) { valuesFolder := s.buildFolderPathForValues(false) valueFiles, err := ioutil.ReadDir(valuesFolder) if err != nil { - return []*proto.Value{}, nil + return []*settingsmsg.Value{}, nil } - records := make([]*proto.Value, 0, len(valueFiles)) + records := make([]*settingsmsg.Value, 0, len(valueFiles)) for _, valueFile := range valueFiles { - record := proto.Value{} + record := settingsmsg.Value{} err := s.parseRecordFromFile(&record, filepath.Join(valuesFolder, valueFile.Name())) if err != nil { s.Logger.Warn().Msgf("error reading %v", valueFile) @@ -47,9 +47,9 @@ func (s Store) ListValues(bundleID, accountUUID string) ([]*proto.Value, error) } // ReadValue tries to find a value by the given valueId within the dataPath -func (s Store) ReadValue(valueID string) (*proto.Value, error) { +func (s Store) ReadValue(valueID string) (*settingsmsg.Value, error) { filePath := s.buildFilePathForValue(valueID, false) - record := proto.Value{} + record := settingsmsg.Value{} if err := s.parseRecordFromFile(&record, filePath); err != nil { return nil, err } @@ -59,7 +59,7 @@ func (s Store) ReadValue(valueID string) (*proto.Value, error) { } // ReadValueByUniqueIdentifiers tries to find a value given a set of unique identifiers -func (s Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*proto.Value, error) { +func (s Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*settingsmsg.Value, error) { valuesFolder := s.buildFolderPathForValues(false) files, err := ioutil.ReadDir(valuesFolder) if err != nil { @@ -67,11 +67,11 @@ func (s Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*pro } for i := range files { if !files[i].IsDir() { - r := proto.Value{} + r := settingsmsg.Value{} s.Logger.Debug().Msgf("reading contents from file: %v", filepath.Join(valuesFolder, files[i].Name())) if err := s.parseRecordFromFile(&r, filepath.Join(valuesFolder, files[i].Name())); err != nil { s.Logger.Debug().Msgf("match found: %v", filepath.Join(valuesFolder, files[i].Name())) - return &proto.Value{}, nil + return &settingsmsg.Value{}, nil } // if value saved without accountUUID, then it's a global value @@ -89,14 +89,14 @@ func (s Store) ReadValueByUniqueIdentifiers(accountUUID, settingID string) (*pro } // WriteValue writes the given value into a file within the dataPath -func (s Store) WriteValue(value *proto.Value) (*proto.Value, error) { +func (s Store) WriteValue(value *settingsmsg.Value) (*settingsmsg.Value, error) { s.Logger.Debug().Str("value", value.String()).Msg("writing value") if value.Id == "" { value.Id = uuid.Must(uuid.NewV4()).String() } // modify value depending on associated resource - if value.Resource.Type == proto.Resource_TYPE_SYSTEM { + if value.Resource.Type == settingsmsg.Resource_TYPE_SYSTEM { value.AccountUuid = "" } diff --git a/settings/pkg/store/filesystem/values_test.go b/settings/pkg/store/filesystem/values_test.go index c6dbc0df6fb..8464cb69013 100644 --- a/settings/pkg/store/filesystem/values_test.go +++ b/settings/pkg/store/filesystem/values_test.go @@ -4,41 +4,41 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "github.com/stretchr/testify/assert" ) var valueScenarios = []struct { name string - value *proto.Value + value *settingsmsg.Value }{ { name: "generic-test-with-system-resource", - value: &proto.Value{ + value: &settingsmsg.Value{ Id: value1, BundleId: bundle1, SettingId: setting1, AccountUuid: accountUUID1, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - Value: &proto.Value_StringValue{ + Value: &settingsmsg.Value_StringValue{ StringValue: "lalala", }, }, }, { name: "generic-test-with-file-resource", - value: &proto.Value{ + value: &settingsmsg.Value{ Id: value2, BundleId: bundle1, SettingId: setting2, AccountUuid: accountUUID1, - Resource: &proto.Resource{ - Type: proto.Resource_TYPE_FILE, + Resource: &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_FILE, Id: "adfba82d-919a-41c3-9cd1-5a3f83b2bf76", }, - Value: &proto.Value_StringValue{ + Value: &settingsmsg.Value_StringValue{ StringValue: "tralala", }, }, diff --git a/settings/pkg/util/resource_helper.go b/settings/pkg/util/resource_helper.go index 37ec35e34c1..0554e7f9e23 100644 --- a/settings/pkg/util/resource_helper.go +++ b/settings/pkg/util/resource_helper.go @@ -1,6 +1,8 @@ package util -import "github.com/owncloud/ocis/settings/pkg/proto/v0" +import ( + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" +) const ( // ResourceIDAll declares on a resource that it matches any id @@ -8,7 +10,7 @@ const ( ) // IsResourceMatched checks if the `example` resource is an exact match or a subset of `definition` -func IsResourceMatched(definition, example *proto.Resource) bool { +func IsResourceMatched(definition, example *settingsmsg.Resource) bool { if definition.Type != example.Type { return false } diff --git a/settings/pkg/util/resource_helper_test.go b/settings/pkg/util/resource_helper_test.go index 698fdf56ef7..8530bdb70cc 100644 --- a/settings/pkg/util/resource_helper_test.go +++ b/settings/pkg/util/resource_helper_test.go @@ -3,80 +3,80 @@ package util import ( "testing" - "github.com/owncloud/ocis/settings/pkg/proto/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" "gotest.tools/v3/assert" ) func TestIsResourceMatched(t *testing.T) { scenarios := []struct { name string - definition *proto.Resource - example *proto.Resource + definition *settingsmsg.Resource + example *settingsmsg.Resource matched bool }{ { "same resource types without ids match", - &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, true, }, { "different resource types without ids don't match", - &proto.Resource{ - Type: proto.Resource_TYPE_SYSTEM, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_SYSTEM, }, - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, }, false, }, { "same resource types with different ids don't match", - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "einstein", }, - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "marie", }, false, }, { "same resource types with same ids match", - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "einstein", }, - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "einstein", }, true, }, { "same resource types with definition = ALL and without id in example is a match", - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: ResourceIDAll, }, - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, }, true, }, { "same resource types with definition.id = ALL and with some id in example is a match", - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: ResourceIDAll, }, - &proto.Resource{ - Type: proto.Resource_TYPE_USER, + &settingsmsg.Resource{ + Type: settingsmsg.Resource_TYPE_USER, Id: "einstein", }, true, diff --git a/settings/proto/v0/settings.proto b/settings/proto/v0/settings.proto deleted file mode 100644 index 8ced40a987d..00000000000 --- a/settings/proto/v0/settings.proto +++ /dev/null @@ -1,416 +0,0 @@ -syntax = "proto3"; - -package com.owncloud.ocis.settings.v0; - -option go_package = "github.com/owncloud/ocis/settings/pkg/proto/v0;proto"; - -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; - -import "protoc-gen-openapiv2/options/annotations.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "ownCloud Infinite Scale settings"; - version: "1.0.0"; - contact: { - name: "ownCloud GmbH"; - url: "https://github.com/owncloud/ocis"; - email: "support@owncloud.com"; - }; - license: { - name: "Apache-2.0"; - url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; - }; - }; - schemes: HTTP; - schemes: HTTPS; - consumes: "application/json"; - produces: "application/json"; - external_docs: { - description: "Developer Manual"; - url: "https://owncloud.dev/extensions/settings/"; - }; -}; - -service BundleService { - rpc SaveBundle(SaveBundleRequest) returns (SaveBundleResponse) { - option (google.api.http) = { - post: "/api/v0/settings/bundle-save", - body: "*" - }; - } - rpc GetBundle(GetBundleRequest) returns (GetBundleResponse) { - option (google.api.http) = { - post: "/api/v0/settings/bundle-get", - body: "*" - }; - } - rpc ListBundles(ListBundlesRequest) returns (ListBundlesResponse) { - option (google.api.http) = { - post: "/api/v0/settings/bundles-list", - body: "*" - }; - } - rpc AddSettingToBundle(AddSettingToBundleRequest) returns (AddSettingToBundleResponse) { - option (google.api.http) = { - post: "/api/v0/settings/bundles-add-setting", - body: "*" - }; - } - rpc RemoveSettingFromBundle(RemoveSettingFromBundleRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/api/v0/settings/bundles-remove-setting", - body: "*" - }; - } -} - -service ValueService { - rpc SaveValue(SaveValueRequest) returns (SaveValueResponse) { - option (google.api.http) = { - post: "/api/v0/settings/values-save", - body: "*" - }; - } - rpc GetValue(GetValueRequest) returns (GetValueResponse) { - option (google.api.http) = { - post: "/api/v0/settings/values-get", - body: "*" - }; - } - rpc ListValues(ListValuesRequest) returns (ListValuesResponse) { - option (google.api.http) = { - post: "/api/v0/settings/values-list", - body: "*" - }; - } - rpc GetValueByUniqueIdentifiers(GetValueByUniqueIdentifiersRequest) returns (GetValueResponse) { - option (google.api.http) = { - post: "/api/v0/settings/values-get-by-unique-identifiers", - body: "*" - }; - } -} - -service RoleService { - rpc ListRoles(ListBundlesRequest) returns (ListBundlesResponse) { - option (google.api.http) = { - post: "/api/v0/settings/roles-list", - body: "*" - }; - } - rpc ListRoleAssignments(ListRoleAssignmentsRequest) returns (ListRoleAssignmentsResponse) { - option (google.api.http) = { - post: "/api/v0/settings/assignments-list", - body: "*" - }; - } - rpc AssignRoleToUser(AssignRoleToUserRequest) returns (AssignRoleToUserResponse) { - option (google.api.http) = { - post: "/api/v0/settings/assignments-add", - body: "*" - }; - } - rpc RemoveRoleFromUser(RemoveRoleFromUserRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/api/v0/settings/assignments-remove", - body: "*" - }; - } -} - -service PermissionService { - rpc ListPermissionsByResource(ListPermissionsByResourceRequest) returns (ListPermissionsByResourceResponse) { - option (google.api.http) = { - post: "/api/v0/settings/permissions-list-by-resource", - body: "*" - }; - } - rpc GetPermissionByID(GetPermissionByIDRequest) returns (GetPermissionByIDResponse) { - option (google.api.http) = { - post: "/api/v0/settings/permissions-get-by-id", - body: "*" - }; - } -} - -// --- -// requests and responses for settings bundles -// --- -message SaveBundleRequest { - Bundle bundle = 1; -} - -message SaveBundleResponse { - Bundle bundle = 1; -} - -message GetBundleRequest { - string bundle_id = 1; -} - -message GetBundleResponse { - Bundle bundle = 1; -} - -message ListBundlesRequest { - repeated string bundle_ids = 1; -} - -message ListBundlesResponse { - repeated Bundle bundles = 1; -} - -message AddSettingToBundleRequest { - string bundle_id = 1; - Setting setting = 2; -} - -message AddSettingToBundleResponse { - Setting setting = 1; -} - -message RemoveSettingFromBundleRequest { - string bundle_id = 1; - string setting_id = 2; -} - -// --- -// requests and responses for settings values -// --- - -message SaveValueRequest { - Value value = 1; -} - -message SaveValueResponse { - ValueWithIdentifier value = 1; -} - -message GetValueRequest { - string id = 1; -} - -message GetValueResponse { - ValueWithIdentifier value = 1; -} - -message ListValuesRequest { - string bundle_id = 1; - string account_uuid = 2; -} - -message ListValuesResponse { - repeated ValueWithIdentifier values = 1; -} - -message GetValueByUniqueIdentifiersRequest{ - string account_uuid = 1; - string setting_id = 2; -} - -message ValueWithIdentifier { - Identifier identifier = 1; - Value value = 2; -} - -message Identifier { - string extension = 1; - string bundle = 2; - string setting = 3; -} - -// -- -// requests and responses for role assignments -// --- - -message ListRoleAssignmentsRequest { - string account_uuid = 1; -} - -message ListRoleAssignmentsResponse { - repeated UserRoleAssignment assignments = 1; -} - -message AssignRoleToUserRequest { - string account_uuid = 1; - // the role_id is a bundle_id internally - string role_id = 2; -} - -message AssignRoleToUserResponse { - UserRoleAssignment assignment = 1; -} - -message RemoveRoleFromUserRequest { - string id = 1; -} - -message UserRoleAssignment { - // id is generated upon saving the assignment - string id = 1; - string account_uuid = 2; - // the role_id is a bundle_id internally - string role_id = 3; -} - -// -- -// requests and responses for permissions -// --- - -message ListPermissionsByResourceRequest { - Resource resource = 1; -} - -message ListPermissionsByResourceResponse { - repeated Permission permissions = 1; -} - -message GetPermissionByIDRequest { - string permission_id = 1; -} - -message GetPermissionByIDResponse { - Permission permission = 1; -} - -// --- -// resource payloads -// --- - -message Resource { - enum Type { - TYPE_UNKNOWN = 0; - TYPE_SYSTEM = 1; - TYPE_FILE = 2; - TYPE_SHARE = 3; - TYPE_SETTING = 4; - TYPE_BUNDLE = 5; - TYPE_USER = 6; - TYPE_GROUP = 7; - } - Type type = 1; - string id = 2; -} - -// --- -// payloads for bundles -// --- - -message Bundle { - enum Type { - TYPE_UNKNOWN = 0; - TYPE_DEFAULT = 1; - TYPE_ROLE = 2; - } - string id = 1; - string name = 2; - Type type = 3; - string extension = 4; - string display_name = 5; - repeated Setting settings = 6; - Resource resource = 7; -} - -message Setting { - string id = 1; - string name = 2; - string display_name = 3; - string description = 4; - oneof value { - Int int_value = 5; - String string_value = 6; - Bool bool_value = 7; - SingleChoiceList single_choice_value = 8; - MultiChoiceList multi_choice_value = 9; - Permission permission_value = 10; - } - Resource resource = 11; -} - -message Int { - int64 default = 1; - int64 min = 2; - int64 max = 3; - int64 step = 4; - string placeholder = 5; -} - -message String { - string default = 1; - bool required = 2; - int32 min_length = 3; - int32 max_length = 4; - string placeholder = 5; -} - -message Bool { - bool default = 1; - string label = 2; -} - -message SingleChoiceList { - repeated ListOption options = 1; -} - -message MultiChoiceList { - repeated ListOption options = 1; -} - -message ListOption { - ListOptionValue value = 1; - bool default = 2; - string display_value = 3; -} - -message Permission { - enum Operation { - OPERATION_UNKNOWN = 0; - OPERATION_CREATE = 1; - OPERATION_READ = 2; - OPERATION_UPDATE = 3; - OPERATION_DELETE = 4; - OPERATION_WRITE = 5;// WRITE is a combination of CREATE and UPDATE - OPERATION_READWRITE = 6;// READWRITE is a combination of READ and WRITE - } - Operation operation = 1; - enum Constraint { - CONSTRAINT_UNKNOWN = 0; - CONSTRAINT_OWN = 1; - CONSTRAINT_SHARED = 2; - CONSTRAINT_ALL = 3; - } - Constraint constraint = 2; -} - -// --- -// payloads for values -// --- - -message Value { - // id is the id of the Value. It is generated on saving it. - string id = 1; - string bundle_id = 2; - // setting_id is the id of the setting from within its bundle. - string setting_id = 3; - string account_uuid = 4; - Resource resource = 5; - oneof value { - bool bool_value = 6; - int64 int_value = 7; - string string_value = 8; - ListValue list_value = 9; - } -} - -message ListValue { - repeated ListOptionValue values = 1; -} - -message ListOptionValue { - oneof option { - string string_value = 1; - int64 int_value = 2; - } -} diff --git a/settings/ui/client/settings/index.js b/settings/ui/client/settings/index.js index 3d82e0682bc..dbc9ea5d83a 100644 --- a/settings/ui/client/settings/index.js +++ b/settings/ui/client/settings/index.js @@ -25,20 +25,20 @@ export const request = (method, url, body, queryParameters, form, config) => { } } /*========================================================== - * + * ==========================================================*/ /** - * + * * request: RoleService_AssignRoleToUser * url: RoleService_AssignRoleToUserURL * method: RoleService_AssignRoleToUser_TYPE * raw_url: RoleService_AssignRoleToUser_RAW_URL - * @param body - + * @param body - */ export const RoleService_AssignRoleToUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-add' + let path = '/api/v1/settings/assignments-add' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const RoleService_AssignRoleToUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_AssignRoleToUser_RAW_URL = function() { - return '/api/v0/settings/assignments-add' + return '/api/v1/settings/assignments-add' } export const RoleService_AssignRoleToUser_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const RoleService_AssignRoleToUser_TYPE = function() { export const RoleService_AssignRoleToUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-add' + let path = '/api/v1/settings/assignments-add' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -74,17 +74,17 @@ export const RoleService_AssignRoleToUserURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_ListRoleAssignments * url: RoleService_ListRoleAssignmentsURL * method: RoleService_ListRoleAssignments_TYPE * raw_url: RoleService_ListRoleAssignments_RAW_URL - * @param body - + * @param body - */ export const RoleService_ListRoleAssignments = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-list' + let path = '/api/v1/settings/assignments-list' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const RoleService_ListRoleAssignments = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoleAssignments_RAW_URL = function() { - return '/api/v0/settings/assignments-list' + return '/api/v1/settings/assignments-list' } export const RoleService_ListRoleAssignments_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const RoleService_ListRoleAssignments_TYPE = function() { export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-list' + let path = '/api/v1/settings/assignments-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -120,17 +120,17 @@ export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_RemoveRoleFromUser * url: RoleService_RemoveRoleFromUserURL * method: RoleService_RemoveRoleFromUser_TYPE * raw_url: RoleService_RemoveRoleFromUser_RAW_URL - * @param body - + * @param body - */ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/assignments-remove' + let path = '/api/v1/settings/assignments-remove' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_RemoveRoleFromUser_RAW_URL = function() { - return '/api/v0/settings/assignments-remove' + return '/api/v1/settings/assignments-remove' } export const RoleService_RemoveRoleFromUser_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const RoleService_RemoveRoleFromUser_TYPE = function() { export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/assignments-remove' + let path = '/api/v1/settings/assignments-remove' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -166,17 +166,17 @@ export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_GetBundle * url: BundleService_GetBundleURL * method: BundleService_GetBundle_TYPE * raw_url: BundleService_GetBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_GetBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundle-get' + let path = '/api/v1/settings/bundle-get' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const BundleService_GetBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_GetBundle_RAW_URL = function() { - return '/api/v0/settings/bundle-get' + return '/api/v1/settings/bundle-get' } export const BundleService_GetBundle_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const BundleService_GetBundle_TYPE = function() { export const BundleService_GetBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundle-get' + let path = '/api/v1/settings/bundle-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -212,17 +212,17 @@ export const BundleService_GetBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_SaveBundle * url: BundleService_SaveBundleURL * method: BundleService_SaveBundle_TYPE * raw_url: BundleService_SaveBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_SaveBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundle-save' + let path = '/api/v1/settings/bundle-save' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const BundleService_SaveBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_SaveBundle_RAW_URL = function() { - return '/api/v0/settings/bundle-save' + return '/api/v1/settings/bundle-save' } export const BundleService_SaveBundle_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const BundleService_SaveBundle_TYPE = function() { export const BundleService_SaveBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundle-save' + let path = '/api/v1/settings/bundle-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -258,17 +258,17 @@ export const BundleService_SaveBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_AddSettingToBundle * url: BundleService_AddSettingToBundleURL * method: BundleService_AddSettingToBundle_TYPE * raw_url: BundleService_AddSettingToBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_AddSettingToBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-add-setting' + let path = '/api/v1/settings/bundles-add-setting' let body let queryParameters = {} let form = {} @@ -286,7 +286,7 @@ export const BundleService_AddSettingToBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_AddSettingToBundle_RAW_URL = function() { - return '/api/v0/settings/bundles-add-setting' + return '/api/v1/settings/bundles-add-setting' } export const BundleService_AddSettingToBundle_TYPE = function() { return 'post' @@ -294,7 +294,7 @@ export const BundleService_AddSettingToBundle_TYPE = function() { export const BundleService_AddSettingToBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-add-setting' + let path = '/api/v1/settings/bundles-add-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -304,17 +304,17 @@ export const BundleService_AddSettingToBundleURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_ListBundles * url: BundleService_ListBundlesURL * method: BundleService_ListBundles_TYPE * raw_url: BundleService_ListBundles_RAW_URL - * @param body - + * @param body - */ export const BundleService_ListBundles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-list' + let path = '/api/v1/settings/bundles-list' let body let queryParameters = {} let form = {} @@ -332,7 +332,7 @@ export const BundleService_ListBundles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_ListBundles_RAW_URL = function() { - return '/api/v0/settings/bundles-list' + return '/api/v1/settings/bundles-list' } export const BundleService_ListBundles_TYPE = function() { return 'post' @@ -340,7 +340,7 @@ export const BundleService_ListBundles_TYPE = function() { export const BundleService_ListBundlesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-list' + let path = '/api/v1/settings/bundles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -350,17 +350,17 @@ export const BundleService_ListBundlesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: BundleService_RemoveSettingFromBundle * url: BundleService_RemoveSettingFromBundleURL * method: BundleService_RemoveSettingFromBundle_TYPE * raw_url: BundleService_RemoveSettingFromBundle_RAW_URL - * @param body - + * @param body - */ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/bundles-remove-setting' + let path = '/api/v1/settings/bundles-remove-setting' let body let queryParameters = {} let form = {} @@ -378,7 +378,7 @@ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_RemoveSettingFromBundle_RAW_URL = function() { - return '/api/v0/settings/bundles-remove-setting' + return '/api/v1/settings/bundles-remove-setting' } export const BundleService_RemoveSettingFromBundle_TYPE = function() { return 'post' @@ -386,7 +386,7 @@ export const BundleService_RemoveSettingFromBundle_TYPE = function() { export const BundleService_RemoveSettingFromBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/bundles-remove-setting' + let path = '/api/v1/settings/bundles-remove-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -396,17 +396,17 @@ export const BundleService_RemoveSettingFromBundleURL = function(parameters = {} return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: PermissionService_GetPermissionByID * url: PermissionService_GetPermissionByIDURL * method: PermissionService_GetPermissionByID_TYPE * raw_url: PermissionService_GetPermissionByID_RAW_URL - * @param body - + * @param body - */ export const PermissionService_GetPermissionByID = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/permissions-get-by-id' + let path = '/api/v1/settings/permissions-get-by-id' let body let queryParameters = {} let form = {} @@ -424,7 +424,7 @@ export const PermissionService_GetPermissionByID = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const PermissionService_GetPermissionByID_RAW_URL = function() { - return '/api/v0/settings/permissions-get-by-id' + return '/api/v1/settings/permissions-get-by-id' } export const PermissionService_GetPermissionByID_TYPE = function() { return 'post' @@ -432,7 +432,7 @@ export const PermissionService_GetPermissionByID_TYPE = function() { export const PermissionService_GetPermissionByIDURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/permissions-get-by-id' + let path = '/api/v1/settings/permissions-get-by-id' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -442,17 +442,17 @@ export const PermissionService_GetPermissionByIDURL = function(parameters = {}) return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: PermissionService_ListPermissionsByResource * url: PermissionService_ListPermissionsByResourceURL * method: PermissionService_ListPermissionsByResource_TYPE * raw_url: PermissionService_ListPermissionsByResource_RAW_URL - * @param body - + * @param body - */ export const PermissionService_ListPermissionsByResource = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/permissions-list-by-resource' + let path = '/api/v1/settings/permissions-list-by-resource' let body let queryParameters = {} let form = {} @@ -470,7 +470,7 @@ export const PermissionService_ListPermissionsByResource = function(parameters = return request('post', domain + path, body, queryParameters, form, config) } export const PermissionService_ListPermissionsByResource_RAW_URL = function() { - return '/api/v0/settings/permissions-list-by-resource' + return '/api/v1/settings/permissions-list-by-resource' } export const PermissionService_ListPermissionsByResource_TYPE = function() { return 'post' @@ -478,7 +478,7 @@ export const PermissionService_ListPermissionsByResource_TYPE = function() { export const PermissionService_ListPermissionsByResourceURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/permissions-list-by-resource' + let path = '/api/v1/settings/permissions-list-by-resource' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -488,17 +488,17 @@ export const PermissionService_ListPermissionsByResourceURL = function(parameter return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: RoleService_ListRoles * url: RoleService_ListRolesURL * method: RoleService_ListRoles_TYPE * raw_url: RoleService_ListRoles_RAW_URL - * @param body - + * @param body - */ export const RoleService_ListRoles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/roles-list' + let path = '/api/v1/settings/roles-list' let body let queryParameters = {} let form = {} @@ -516,7 +516,7 @@ export const RoleService_ListRoles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoles_RAW_URL = function() { - return '/api/v0/settings/roles-list' + return '/api/v1/settings/roles-list' } export const RoleService_ListRoles_TYPE = function() { return 'post' @@ -524,7 +524,7 @@ export const RoleService_ListRoles_TYPE = function() { export const RoleService_ListRolesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/roles-list' + let path = '/api/v1/settings/roles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -534,17 +534,17 @@ export const RoleService_ListRolesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_GetValue * url: ValueService_GetValueURL * method: ValueService_GetValue_TYPE * raw_url: ValueService_GetValue_RAW_URL - * @param body - + * @param body - */ export const ValueService_GetValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-get' + let path = '/api/v1/settings/values-get' let body let queryParameters = {} let form = {} @@ -562,7 +562,7 @@ export const ValueService_GetValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValue_RAW_URL = function() { - return '/api/v0/settings/values-get' + return '/api/v1/settings/values-get' } export const ValueService_GetValue_TYPE = function() { return 'post' @@ -570,7 +570,7 @@ export const ValueService_GetValue_TYPE = function() { export const ValueService_GetValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-get' + let path = '/api/v1/settings/values-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -580,17 +580,17 @@ export const ValueService_GetValueURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_GetValueByUniqueIdentifiers * url: ValueService_GetValueByUniqueIdentifiersURL * method: ValueService_GetValueByUniqueIdentifiers_TYPE * raw_url: ValueService_GetValueByUniqueIdentifiers_RAW_URL - * @param body - + * @param body - */ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-get-by-unique-identifiers' + let path = '/api/v1/settings/values-get-by-unique-identifiers' let body let queryParameters = {} let form = {} @@ -608,7 +608,7 @@ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {} return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValueByUniqueIdentifiers_RAW_URL = function() { - return '/api/v0/settings/values-get-by-unique-identifiers' + return '/api/v1/settings/values-get-by-unique-identifiers' } export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { return 'post' @@ -616,7 +616,7 @@ export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-get-by-unique-identifiers' + let path = '/api/v1/settings/values-get-by-unique-identifiers' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -626,17 +626,17 @@ export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_ListValues * url: ValueService_ListValuesURL * method: ValueService_ListValues_TYPE * raw_url: ValueService_ListValues_RAW_URL - * @param body - + * @param body - */ export const ValueService_ListValues = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-list' + let path = '/api/v1/settings/values-list' let body let queryParameters = {} let form = {} @@ -654,7 +654,7 @@ export const ValueService_ListValues = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_ListValues_RAW_URL = function() { - return '/api/v0/settings/values-list' + return '/api/v1/settings/values-list' } export const ValueService_ListValues_TYPE = function() { return 'post' @@ -662,7 +662,7 @@ export const ValueService_ListValues_TYPE = function() { export const ValueService_ListValuesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-list' + let path = '/api/v1/settings/values-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -672,17 +672,17 @@ export const ValueService_ListValuesURL = function(parameters = {}) { return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') } /** - * + * * request: ValueService_SaveValue * url: ValueService_SaveValueURL * method: ValueService_SaveValue_TYPE * raw_url: ValueService_SaveValue_RAW_URL - * @param body - + * @param body - */ export const ValueService_SaveValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v0/settings/values-save' + let path = '/api/v1/settings/values-save' let body let queryParameters = {} let form = {} @@ -700,7 +700,7 @@ export const ValueService_SaveValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_SaveValue_RAW_URL = function() { - return '/api/v0/settings/values-save' + return '/api/v1/settings/values-save' } export const ValueService_SaveValue_TYPE = function() { return 'post' @@ -708,7 +708,7 @@ export const ValueService_SaveValue_TYPE = function() { export const ValueService_SaveValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v0/settings/values-save' + let path = '/api/v1/settings/values-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -716,4 +716,4 @@ export const ValueService_SaveValueURL = function(parameters = {}) { } let keys = Object.keys(queryParameters) return domain + path + (keys.length > 0 ? '?' + (keys.map(key => key + '=' + encodeURIComponent(queryParameters[key])).join('&')) : '') -} \ No newline at end of file +} From cce51fdd615e1c1426d799ee765868d0ad745faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 12 Jan 2022 15:35:05 +0100 Subject: [PATCH 08/20] Revert change to keep using api/v0 for accounts and settings --- accounts/ui/client/accounts/index.js | 30 +++---- accounts/ui/client/settings/index.js | 78 ++++++++-------- .../ocis/services/accounts/v1/accounts.pb.go | 28 +++--- .../services/accounts/v1/accounts.pb.micro.go | 56 ++++++------ .../services/accounts/v1/accounts.pb.web.go | 28 +++--- .../accounts/v1/accounts.swagger.json | 28 +++--- .../ocis/services/settings/v1/settings.pb.go | 30 +++---- .../services/settings/v1/settings.pb.micro.go | 60 ++++++------- .../services/settings/v1/settings.pb.web.go | 30 +++---- .../settings/v1/settings.swagger.json | 30 +++---- .../ocis/services/accounts/v1/accounts.proto | 28 +++--- .../ocis/services/settings/v1/settings.proto | 30 +++---- proxy/pkg/config/defaultconfig.go | 4 +- settings/ui/client/settings/index.js | 90 +++++++++---------- 14 files changed, 275 insertions(+), 275 deletions(-) diff --git a/accounts/ui/client/accounts/index.js b/accounts/ui/client/accounts/index.js index 2cde5cf77e6..569dcd54aad 100644 --- a/accounts/ui/client/accounts/index.js +++ b/accounts/ui/client/accounts/index.js @@ -38,7 +38,7 @@ export const request = (method, url, body, queryParameters, form, config) => { export const AccountsService_CreateAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/accounts/accounts-create' + let path = '/api/v0/accounts/accounts-create' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const AccountsService_CreateAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_CreateAccount_RAW_URL = function() { - return '/api/v1/accounts/accounts-create' + return '/api/v0/accounts/accounts-create' } export const AccountsService_CreateAccount_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const AccountsService_CreateAccount_TYPE = function() { export const AccountsService_CreateAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/accounts/accounts-create' + let path = '/api/v0/accounts/accounts-create' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -84,7 +84,7 @@ export const AccountsService_CreateAccountURL = function(parameters = {}) { export const AccountsService_DeleteAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/accounts/accounts-delete' + let path = '/api/v0/accounts/accounts-delete' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const AccountsService_DeleteAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_DeleteAccount_RAW_URL = function() { - return '/api/v1/accounts/accounts-delete' + return '/api/v0/accounts/accounts-delete' } export const AccountsService_DeleteAccount_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const AccountsService_DeleteAccount_TYPE = function() { export const AccountsService_DeleteAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/accounts/accounts-delete' + let path = '/api/v0/accounts/accounts-delete' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -130,7 +130,7 @@ export const AccountsService_DeleteAccountURL = function(parameters = {}) { export const AccountsService_GetAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/accounts/accounts-get' + let path = '/api/v0/accounts/accounts-get' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const AccountsService_GetAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_GetAccount_RAW_URL = function() { - return '/api/v1/accounts/accounts-get' + return '/api/v0/accounts/accounts-get' } export const AccountsService_GetAccount_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const AccountsService_GetAccount_TYPE = function() { export const AccountsService_GetAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/accounts/accounts-get' + let path = '/api/v0/accounts/accounts-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -176,7 +176,7 @@ export const AccountsService_GetAccountURL = function(parameters = {}) { export const AccountsService_ListAccounts = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/accounts/accounts-list' + let path = '/api/v0/accounts/accounts-list' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const AccountsService_ListAccounts = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_ListAccounts_RAW_URL = function() { - return '/api/v1/accounts/accounts-list' + return '/api/v0/accounts/accounts-list' } export const AccountsService_ListAccounts_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const AccountsService_ListAccounts_TYPE = function() { export const AccountsService_ListAccountsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/accounts/accounts-list' + let path = '/api/v0/accounts/accounts-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -222,7 +222,7 @@ export const AccountsService_ListAccountsURL = function(parameters = {}) { export const AccountsService_UpdateAccount = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/accounts/accounts-update' + let path = '/api/v0/accounts/accounts-update' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const AccountsService_UpdateAccount = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const AccountsService_UpdateAccount_RAW_URL = function() { - return '/api/v1/accounts/accounts-update' + return '/api/v0/accounts/accounts-update' } export const AccountsService_UpdateAccount_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const AccountsService_UpdateAccount_TYPE = function() { export const AccountsService_UpdateAccountURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/accounts/accounts-update' + let path = '/api/v0/accounts/accounts-update' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] diff --git a/accounts/ui/client/settings/index.js b/accounts/ui/client/settings/index.js index 69dce246ec7..48cb14efd88 100644 --- a/accounts/ui/client/settings/index.js +++ b/accounts/ui/client/settings/index.js @@ -38,7 +38,7 @@ export const request = (method, url, body, queryParameters, form, config) => { export const RoleService_AssignRoleToUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-add' + let path = '/api/v0/settings/assignments-add' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const RoleService_AssignRoleToUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_AssignRoleToUser_RAW_URL = function() { - return '/api/v1/settings/assignments-add' + return '/api/v0/settings/assignments-add' } export const RoleService_AssignRoleToUser_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const RoleService_AssignRoleToUser_TYPE = function() { export const RoleService_AssignRoleToUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-add' + let path = '/api/v0/settings/assignments-add' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -84,7 +84,7 @@ export const RoleService_AssignRoleToUserURL = function(parameters = {}) { export const RoleService_ListRoleAssignments = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-list' + let path = '/api/v0/settings/assignments-list' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const RoleService_ListRoleAssignments = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoleAssignments_RAW_URL = function() { - return '/api/v1/settings/assignments-list' + return '/api/v0/settings/assignments-list' } export const RoleService_ListRoleAssignments_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const RoleService_ListRoleAssignments_TYPE = function() { export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-list' + let path = '/api/v0/settings/assignments-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -130,7 +130,7 @@ export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { export const RoleService_RemoveRoleFromUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-remove' + let path = '/api/v0/settings/assignments-remove' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_RemoveRoleFromUser_RAW_URL = function() { - return '/api/v1/settings/assignments-remove' + return '/api/v0/settings/assignments-remove' } export const RoleService_RemoveRoleFromUser_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const RoleService_RemoveRoleFromUser_TYPE = function() { export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-remove' + let path = '/api/v0/settings/assignments-remove' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -176,7 +176,7 @@ export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { export const BundleService_GetBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundle-get' + let path = '/api/v0/settings/bundle-get' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const BundleService_GetBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_GetBundle_RAW_URL = function() { - return '/api/v1/settings/bundle-get' + return '/api/v0/settings/bundle-get' } export const BundleService_GetBundle_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const BundleService_GetBundle_TYPE = function() { export const BundleService_GetBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundle-get' + let path = '/api/v0/settings/bundle-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -222,7 +222,7 @@ export const BundleService_GetBundleURL = function(parameters = {}) { export const BundleService_SaveBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundle-save' + let path = '/api/v0/settings/bundle-save' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const BundleService_SaveBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_SaveBundle_RAW_URL = function() { - return '/api/v1/settings/bundle-save' + return '/api/v0/settings/bundle-save' } export const BundleService_SaveBundle_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const BundleService_SaveBundle_TYPE = function() { export const BundleService_SaveBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundle-save' + let path = '/api/v0/settings/bundle-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -268,7 +268,7 @@ export const BundleService_SaveBundleURL = function(parameters = {}) { export const BundleService_AddSettingToBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-add-setting' + let path = '/api/v0/settings/bundles-add-setting' let body let queryParameters = {} let form = {} @@ -286,7 +286,7 @@ export const BundleService_AddSettingToBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_AddSettingToBundle_RAW_URL = function() { - return '/api/v1/settings/bundles-add-setting' + return '/api/v0/settings/bundles-add-setting' } export const BundleService_AddSettingToBundle_TYPE = function() { return 'post' @@ -294,7 +294,7 @@ export const BundleService_AddSettingToBundle_TYPE = function() { export const BundleService_AddSettingToBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-add-setting' + let path = '/api/v0/settings/bundles-add-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -314,7 +314,7 @@ export const BundleService_AddSettingToBundleURL = function(parameters = {}) { export const BundleService_ListBundles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-list' + let path = '/api/v0/settings/bundles-list' let body let queryParameters = {} let form = {} @@ -332,7 +332,7 @@ export const BundleService_ListBundles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_ListBundles_RAW_URL = function() { - return '/api/v1/settings/bundles-list' + return '/api/v0/settings/bundles-list' } export const BundleService_ListBundles_TYPE = function() { return 'post' @@ -340,7 +340,7 @@ export const BundleService_ListBundles_TYPE = function() { export const BundleService_ListBundlesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-list' + let path = '/api/v0/settings/bundles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -360,7 +360,7 @@ export const BundleService_ListBundlesURL = function(parameters = {}) { export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-remove-setting' + let path = '/api/v0/settings/bundles-remove-setting' let body let queryParameters = {} let form = {} @@ -378,7 +378,7 @@ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_RemoveSettingFromBundle_RAW_URL = function() { - return '/api/v1/settings/bundles-remove-setting' + return '/api/v0/settings/bundles-remove-setting' } export const BundleService_RemoveSettingFromBundle_TYPE = function() { return 'post' @@ -386,7 +386,7 @@ export const BundleService_RemoveSettingFromBundle_TYPE = function() { export const BundleService_RemoveSettingFromBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-remove-setting' + let path = '/api/v0/settings/bundles-remove-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -406,7 +406,7 @@ export const BundleService_RemoveSettingFromBundleURL = function(parameters = {} export const RoleService_ListRoles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/roles-list' + let path = '/api/v0/settings/roles-list' let body let queryParameters = {} let form = {} @@ -424,7 +424,7 @@ export const RoleService_ListRoles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoles_RAW_URL = function() { - return '/api/v1/settings/roles-list' + return '/api/v0/settings/roles-list' } export const RoleService_ListRoles_TYPE = function() { return 'post' @@ -432,7 +432,7 @@ export const RoleService_ListRoles_TYPE = function() { export const RoleService_ListRolesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/roles-list' + let path = '/api/v0/settings/roles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -452,7 +452,7 @@ export const RoleService_ListRolesURL = function(parameters = {}) { export const ValueService_GetValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-get' + let path = '/api/v0/settings/values-get' let body let queryParameters = {} let form = {} @@ -470,7 +470,7 @@ export const ValueService_GetValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValue_RAW_URL = function() { - return '/api/v1/settings/values-get' + return '/api/v0/settings/values-get' } export const ValueService_GetValue_TYPE = function() { return 'post' @@ -478,7 +478,7 @@ export const ValueService_GetValue_TYPE = function() { export const ValueService_GetValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-get' + let path = '/api/v0/settings/values-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -498,7 +498,7 @@ export const ValueService_GetValueURL = function(parameters = {}) { export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-get-by-unique-identifiers' + let path = '/api/v0/settings/values-get-by-unique-identifiers' let body let queryParameters = {} let form = {} @@ -516,7 +516,7 @@ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {} return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValueByUniqueIdentifiers_RAW_URL = function() { - return '/api/v1/settings/values-get-by-unique-identifiers' + return '/api/v0/settings/values-get-by-unique-identifiers' } export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { return 'post' @@ -524,7 +524,7 @@ export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-get-by-unique-identifiers' + let path = '/api/v0/settings/values-get-by-unique-identifiers' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -544,7 +544,7 @@ export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = export const ValueService_ListValues = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-list' + let path = '/api/v0/settings/values-list' let body let queryParameters = {} let form = {} @@ -562,7 +562,7 @@ export const ValueService_ListValues = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_ListValues_RAW_URL = function() { - return '/api/v1/settings/values-list' + return '/api/v0/settings/values-list' } export const ValueService_ListValues_TYPE = function() { return 'post' @@ -570,7 +570,7 @@ export const ValueService_ListValues_TYPE = function() { export const ValueService_ListValuesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-list' + let path = '/api/v0/settings/values-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -590,7 +590,7 @@ export const ValueService_ListValuesURL = function(parameters = {}) { export const ValueService_SaveValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-save' + let path = '/api/v0/settings/values-save' let body let queryParameters = {} let form = {} @@ -608,7 +608,7 @@ export const ValueService_SaveValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_SaveValue_RAW_URL = function() { - return '/api/v1/settings/values-save' + return '/api/v0/settings/values-save' } export const ValueService_SaveValue_TYPE = function() { return 'post' @@ -616,7 +616,7 @@ export const ValueService_SaveValue_TYPE = function() { export const ValueService_SaveValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-save' + let path = '/api/v0/settings/values-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go index ef51603939b..5d3072c769e 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.go @@ -1226,7 +1226,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, + 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x88, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, @@ -1234,7 +1234,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, @@ -1243,7 +1243,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, @@ -1253,7 +1253,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, @@ -1261,7 +1261,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, + 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0x95, 0x09, 0x0a, 0x0d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, @@ -1272,7 +1272,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, @@ -1280,7 +1280,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, @@ -1289,7 +1289,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, @@ -1297,7 +1297,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, - 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, @@ -1306,7 +1306,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, @@ -1314,7 +1314,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2e, @@ -1324,7 +1324,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, + 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, @@ -1335,7 +1335,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, + 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x32, 0xa2, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, @@ -1346,7 +1346,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe7, 0x02, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x66, 0x61, 0x6e, 0x65, 0x7a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x30, 0x30, 0x31, 0x2f, 0x67, 0x65, diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go index 3e70a6ec086..b255ba98d6a 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go @@ -38,35 +38,35 @@ func NewAccountsServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "AccountsService.ListAccounts", - Path: []string{"/api/v1/accounts/accounts-list"}, + Path: []string{"/api/v0/accounts/accounts-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "AccountsService.GetAccount", - Path: []string{"/api/v1/accounts/accounts-get"}, + Path: []string{"/api/v0/accounts/accounts-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "AccountsService.CreateAccount", - Path: []string{"/api/v1/accounts/accounts-create"}, + Path: []string{"/api/v0/accounts/accounts-create"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v1/accounts/accounts-update"}, + Path: []string{"/api/v0/accounts/accounts-update"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v1/accounts/accounts-delete"}, + Path: []string{"/api/v0/accounts/accounts-delete"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -180,35 +180,35 @@ func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler h := &accountsServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "AccountsService.ListAccounts", - Path: []string{"/api/v1/accounts/accounts-list"}, + Path: []string{"/api/v0/accounts/accounts-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "AccountsService.GetAccount", - Path: []string{"/api/v1/accounts/accounts-get"}, + Path: []string{"/api/v0/accounts/accounts-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "AccountsService.CreateAccount", - Path: []string{"/api/v1/accounts/accounts-create"}, + Path: []string{"/api/v0/accounts/accounts-create"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v1/accounts/accounts-update"}, + Path: []string{"/api/v0/accounts/accounts-update"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v1/accounts/accounts-delete"}, + Path: []string{"/api/v0/accounts/accounts-delete"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -246,56 +246,56 @@ func NewGroupsServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "GroupsService.ListGroups", - Path: []string{"/api/v1/accounts/groups-list"}, + Path: []string{"/api/v0/accounts/groups-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.GetGroup", - Path: []string{"/api/v1/accounts/groups-get"}, + Path: []string{"/api/v0/accounts/groups-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.CreateGroup", - Path: []string{"/api/v1/accounts/groups-create"}, + Path: []string{"/api/v0/accounts/groups-create"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v1/accounts/groups-update"}, + Path: []string{"/api/v0/accounts/groups-update"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v1/accounts/groups-delete"}, + Path: []string{"/api/v0/accounts/groups-delete"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.AddMember", - Path: []string{"/api/v1/groups/{group_id=*}/members/$ref"}, + Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.RemoveMember", - Path: []string{"/api/v1/groups/{group_id=*}/members/{account_id}/$ref"}, + Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "GroupsService.ListMembers", - Path: []string{"/api/v1/groups/{id=*}/members/$ref"}, + Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -454,56 +454,56 @@ func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, op h := &groupsServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.ListGroups", - Path: []string{"/api/v1/accounts/groups-list"}, + Path: []string{"/api/v0/accounts/groups-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.GetGroup", - Path: []string{"/api/v1/accounts/groups-get"}, + Path: []string{"/api/v0/accounts/groups-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.CreateGroup", - Path: []string{"/api/v1/accounts/groups-create"}, + Path: []string{"/api/v0/accounts/groups-create"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v1/accounts/groups-update"}, + Path: []string{"/api/v0/accounts/groups-update"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v1/accounts/groups-delete"}, + Path: []string{"/api/v0/accounts/groups-delete"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.AddMember", - Path: []string{"/api/v1/groups/{group_id=*}/members/$ref"}, + Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.RemoveMember", - Path: []string{"/api/v1/groups/{group_id=*}/members/{account_id}/$ref"}, + Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "GroupsService.ListMembers", - Path: []string{"/api/v1/groups/{id=*}/members/$ref"}, + Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -553,7 +553,7 @@ func NewIndexServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "IndexService.RebuildIndex", - Path: []string{"/api/v1/index/rebuild"}, + Path: []string{"/api/v0/index/rebuild"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -605,7 +605,7 @@ func RegisterIndexServiceHandler(s server.Server, hdlr IndexServiceHandler, opts h := &indexServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "IndexService.RebuildIndex", - Path: []string{"/api/v1/index/rebuild"}, + Path: []string{"/api/v0/index/rebuild"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go b/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go index e0db958c8da..446d149930d 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go +++ b/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go @@ -141,11 +141,11 @@ func RegisterAccountsServiceWeb(r chi.Router, i AccountsServiceHandler, middlewa h: i, } - r.MethodFunc("POST", "/api/v1/accounts/accounts-list", handler.ListAccounts) - r.MethodFunc("POST", "/api/v1/accounts/accounts-get", handler.GetAccount) - r.MethodFunc("POST", "/api/v1/accounts/accounts-create", handler.CreateAccount) - r.MethodFunc("POST", "/api/v1/accounts/accounts-update", handler.UpdateAccount) - r.MethodFunc("POST", "/api/v1/accounts/accounts-delete", handler.DeleteAccount) + r.MethodFunc("POST", "/api/v0/accounts/accounts-list", handler.ListAccounts) + r.MethodFunc("POST", "/api/v0/accounts/accounts-get", handler.GetAccount) + r.MethodFunc("POST", "/api/v0/accounts/accounts-create", handler.CreateAccount) + r.MethodFunc("POST", "/api/v0/accounts/accounts-update", handler.UpdateAccount) + r.MethodFunc("POST", "/api/v0/accounts/accounts-delete", handler.DeleteAccount) } type webGroupsServiceHandler struct { @@ -339,14 +339,14 @@ func RegisterGroupsServiceWeb(r chi.Router, i GroupsServiceHandler, middlewares h: i, } - r.MethodFunc("POST", "/api/v1/accounts/groups-list", handler.ListGroups) - r.MethodFunc("POST", "/api/v1/accounts/groups-get", handler.GetGroup) - r.MethodFunc("POST", "/api/v1/accounts/groups-create", handler.CreateGroup) - r.MethodFunc("POST", "/api/v1/accounts/groups-update", handler.UpdateGroup) - r.MethodFunc("POST", "/api/v1/accounts/groups-delete", handler.DeleteGroup) - r.MethodFunc("POST", "/api/v1/groups/{group_id=*}/members/$ref", handler.AddMember) - r.MethodFunc("POST", "/api/v1/groups/{group_id=*}/members/{account_id}/$ref", handler.RemoveMember) - r.MethodFunc("POST", "/api/v1/groups/{id=*}/members/$ref", handler.ListMembers) + r.MethodFunc("POST", "/api/v0/accounts/groups-list", handler.ListGroups) + r.MethodFunc("POST", "/api/v0/accounts/groups-get", handler.GetGroup) + r.MethodFunc("POST", "/api/v0/accounts/groups-create", handler.CreateGroup) + r.MethodFunc("POST", "/api/v0/accounts/groups-update", handler.UpdateGroup) + r.MethodFunc("POST", "/api/v0/accounts/groups-delete", handler.DeleteGroup) + r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/$ref", handler.AddMember) + r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/{account_id}/$ref", handler.RemoveMember) + r.MethodFunc("POST", "/api/v0/groups/{id=*}/members/$ref", handler.ListMembers) } type webIndexServiceHandler struct { @@ -386,7 +386,7 @@ func RegisterIndexServiceWeb(r chi.Router, i IndexServiceHandler, middlewares .. h: i, } - r.MethodFunc("POST", "/api/v1/index/rebuild", handler.RebuildIndex) + r.MethodFunc("POST", "/api/v0/index/rebuild", handler.RebuildIndex) } // RebuildIndexRequestJSONMarshaler describes the default jsonpb.Marshaler used by all diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json index 90de3fdc11e..e81d6f903cb 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -35,7 +35,7 @@ "application/json" ], "paths": { - "/api/v1/accounts/accounts-create": { + "/api/v0/accounts/accounts-create": { "post": { "summary": "Creates an account", "operationId": "AccountsService_CreateAccount", @@ -68,7 +68,7 @@ ] } }, - "/api/v1/accounts/accounts-delete": { + "/api/v0/accounts/accounts-delete": { "post": { "summary": "Deletes an account", "operationId": "AccountsService_DeleteAccount", @@ -101,7 +101,7 @@ ] } }, - "/api/v1/accounts/accounts-get": { + "/api/v0/accounts/accounts-get": { "post": { "summary": "Gets an account", "operationId": "AccountsService_GetAccount", @@ -134,7 +134,7 @@ ] } }, - "/api/v1/accounts/accounts-list": { + "/api/v0/accounts/accounts-list": { "post": { "summary": "Lists accounts", "operationId": "AccountsService_ListAccounts", @@ -167,7 +167,7 @@ ] } }, - "/api/v1/accounts/accounts-update": { + "/api/v0/accounts/accounts-update": { "post": { "summary": "Updates an account", "operationId": "AccountsService_UpdateAccount", @@ -200,7 +200,7 @@ ] } }, - "/api/v1/accounts/groups-create": { + "/api/v0/accounts/groups-create": { "post": { "summary": "Creates a group", "operationId": "GroupsService_CreateGroup", @@ -233,7 +233,7 @@ ] } }, - "/api/v1/accounts/groups-delete": { + "/api/v0/accounts/groups-delete": { "post": { "summary": "Deletes a group", "operationId": "GroupsService_DeleteGroup", @@ -266,7 +266,7 @@ ] } }, - "/api/v1/accounts/groups-get": { + "/api/v0/accounts/groups-get": { "post": { "summary": "Gets an groups", "operationId": "GroupsService_GetGroup", @@ -299,7 +299,7 @@ ] } }, - "/api/v1/accounts/groups-list": { + "/api/v0/accounts/groups-list": { "post": { "summary": "Lists groups", "operationId": "GroupsService_ListGroups", @@ -332,7 +332,7 @@ ] } }, - "/api/v1/accounts/groups-update": { + "/api/v0/accounts/groups-update": { "post": { "summary": "Updates a group", "operationId": "GroupsService_UpdateGroup", @@ -365,7 +365,7 @@ ] } }, - "/api/v1/groups/{groupId}/members/$ref": { + "/api/v0/groups/{groupId}/members/$ref": { "post": { "summary": "group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0\u0026tabs=http", "operationId": "GroupsService_AddMember", @@ -411,7 +411,7 @@ ] } }, - "/api/v1/groups/{groupId}/members/{accountId}/$ref": { + "/api/v0/groups/{groupId}/members/{accountId}/$ref": { "post": { "summary": "group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0", "operationId": "GroupsService_RemoveMember", @@ -458,7 +458,7 @@ ] } }, - "/api/v1/groups/{id}/members/$ref": { + "/api/v0/groups/{id}/members/$ref": { "post": { "summary": "group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0", "operationId": "GroupsService_ListMembers", @@ -517,7 +517,7 @@ ] } }, - "/api/v1/index/rebuild": { + "/api/v0/index/rebuild": { "post": { "operationId": "IndexService_RebuildIndex", "responses": { diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.go b/protogen/gen/ocis/services/settings/v1/settings.pb.go index 712745fa5ca..926182a3683 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.go +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.go @@ -1399,7 +1399,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, + 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, @@ -1408,7 +1408,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, @@ -1418,7 +1418,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, @@ -1429,7 +1429,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, @@ -1439,7 +1439,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x22, 0x27, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x32, 0x8d, 0x05, 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, @@ -1450,7 +1450,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, + 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, @@ -1459,7 +1459,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, @@ -1468,7 +1468,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, + 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, @@ -1479,7 +1479,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x2d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x32, 0x97, 0x05, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, @@ -1491,7 +1491,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, + 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, @@ -1502,7 +1502,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, + 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, @@ -1512,7 +1512,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, @@ -1522,7 +1522,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, + 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0x9a, 0x03, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd0, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, @@ -1536,7 +1536,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, @@ -1547,7 +1547,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, + 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xe5, 0x02, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go b/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go index 300fd96a857..d6e7ece4cb6 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go @@ -37,35 +37,35 @@ func NewBundleServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "BundleService.SaveBundle", - Path: []string{"/api/v1/settings/bundle-save"}, + Path: []string{"/api/v0/settings/bundle-save"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "BundleService.GetBundle", - Path: []string{"/api/v1/settings/bundle-get"}, + Path: []string{"/api/v0/settings/bundle-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "BundleService.ListBundles", - Path: []string{"/api/v1/settings/bundles-list"}, + Path: []string{"/api/v0/settings/bundles-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "BundleService.AddSettingToBundle", - Path: []string{"/api/v1/settings/bundles-add-setting"}, + Path: []string{"/api/v0/settings/bundles-add-setting"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "BundleService.RemoveSettingFromBundle", - Path: []string{"/api/v1/settings/bundles-remove-setting"}, + Path: []string{"/api/v0/settings/bundles-remove-setting"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -169,35 +169,35 @@ func RegisterBundleServiceHandler(s server.Server, hdlr BundleServiceHandler, op h := &bundleServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.SaveBundle", - Path: []string{"/api/v1/settings/bundle-save"}, + Path: []string{"/api/v0/settings/bundle-save"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.GetBundle", - Path: []string{"/api/v1/settings/bundle-get"}, + Path: []string{"/api/v0/settings/bundle-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.ListBundles", - Path: []string{"/api/v1/settings/bundles-list"}, + Path: []string{"/api/v0/settings/bundles-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.AddSettingToBundle", - Path: []string{"/api/v1/settings/bundles-add-setting"}, + Path: []string{"/api/v0/settings/bundles-add-setting"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "BundleService.RemoveSettingFromBundle", - Path: []string{"/api/v1/settings/bundles-remove-setting"}, + Path: []string{"/api/v0/settings/bundles-remove-setting"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -235,28 +235,28 @@ func NewValueServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "ValueService.SaveValue", - Path: []string{"/api/v1/settings/values-save"}, + Path: []string{"/api/v0/settings/values-save"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "ValueService.GetValue", - Path: []string{"/api/v1/settings/values-get"}, + Path: []string{"/api/v0/settings/values-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "ValueService.ListValues", - Path: []string{"/api/v1/settings/values-list"}, + Path: []string{"/api/v0/settings/values-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "ValueService.GetValueByUniqueIdentifiers", - Path: []string{"/api/v1/settings/values-get-by-unique-identifiers"}, + Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -347,28 +347,28 @@ func RegisterValueServiceHandler(s server.Server, hdlr ValueServiceHandler, opts h := &valueServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.SaveValue", - Path: []string{"/api/v1/settings/values-save"}, + Path: []string{"/api/v0/settings/values-save"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.GetValue", - Path: []string{"/api/v1/settings/values-get"}, + Path: []string{"/api/v0/settings/values-get"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.ListValues", - Path: []string{"/api/v1/settings/values-list"}, + Path: []string{"/api/v0/settings/values-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "ValueService.GetValueByUniqueIdentifiers", - Path: []string{"/api/v1/settings/values-get-by-unique-identifiers"}, + Path: []string{"/api/v0/settings/values-get-by-unique-identifiers"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -402,28 +402,28 @@ func NewRoleServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "RoleService.ListRoles", - Path: []string{"/api/v1/settings/roles-list"}, + Path: []string{"/api/v0/settings/roles-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "RoleService.ListRoleAssignments", - Path: []string{"/api/v1/settings/assignments-list"}, + Path: []string{"/api/v0/settings/assignments-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "RoleService.AssignRoleToUser", - Path: []string{"/api/v1/settings/assignments-add"}, + Path: []string{"/api/v0/settings/assignments-add"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "RoleService.RemoveRoleFromUser", - Path: []string{"/api/v1/settings/assignments-remove"}, + Path: []string{"/api/v0/settings/assignments-remove"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -514,28 +514,28 @@ func RegisterRoleServiceHandler(s server.Server, hdlr RoleServiceHandler, opts . h := &roleServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.ListRoles", - Path: []string{"/api/v1/settings/roles-list"}, + Path: []string{"/api/v0/settings/roles-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.ListRoleAssignments", - Path: []string{"/api/v1/settings/assignments-list"}, + Path: []string{"/api/v0/settings/assignments-list"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.AssignRoleToUser", - Path: []string{"/api/v1/settings/assignments-add"}, + Path: []string{"/api/v0/settings/assignments-add"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "RoleService.RemoveRoleFromUser", - Path: []string{"/api/v1/settings/assignments-remove"}, + Path: []string{"/api/v0/settings/assignments-remove"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -569,14 +569,14 @@ func NewPermissionServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{ { Name: "PermissionService.ListPermissionsByResource", - Path: []string{"/api/v1/settings/permissions-list-by-resource"}, + Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", }, { Name: "PermissionService.GetPermissionByID", - Path: []string{"/api/v1/settings/permissions-get-by-id"}, + Path: []string{"/api/v0/settings/permissions-get-by-id"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", @@ -641,14 +641,14 @@ func RegisterPermissionServiceHandler(s server.Server, hdlr PermissionServiceHan h := &permissionServiceHandler{hdlr} opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "PermissionService.ListPermissionsByResource", - Path: []string{"/api/v1/settings/permissions-list-by-resource"}, + Path: []string{"/api/v0/settings/permissions-list-by-resource"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", })) opts = append(opts, api.WithEndpoint(&api.Endpoint{ Name: "PermissionService.GetPermissionByID", - Path: []string{"/api/v1/settings/permissions-get-by-id"}, + Path: []string{"/api/v0/settings/permissions-get-by-id"}, Method: []string{"POST"}, Body: "*", Handler: "rpc", diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.web.go b/protogen/gen/ocis/services/settings/v1/settings.pb.web.go index a2864c157e3..b6de3fcbd40 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.web.go +++ b/protogen/gen/ocis/services/settings/v1/settings.pb.web.go @@ -140,11 +140,11 @@ func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares h: i, } - r.MethodFunc("POST", "/api/v1/settings/bundle-save", handler.SaveBundle) - r.MethodFunc("POST", "/api/v1/settings/bundle-get", handler.GetBundle) - r.MethodFunc("POST", "/api/v1/settings/bundles-list", handler.ListBundles) - r.MethodFunc("POST", "/api/v1/settings/bundles-add-setting", handler.AddSettingToBundle) - r.MethodFunc("POST", "/api/v1/settings/bundles-remove-setting", handler.RemoveSettingFromBundle) + r.MethodFunc("POST", "/api/v0/settings/bundle-save", handler.SaveBundle) + r.MethodFunc("POST", "/api/v0/settings/bundle-get", handler.GetBundle) + r.MethodFunc("POST", "/api/v0/settings/bundles-list", handler.ListBundles) + r.MethodFunc("POST", "/api/v0/settings/bundles-add-setting", handler.AddSettingToBundle) + r.MethodFunc("POST", "/api/v0/settings/bundles-remove-setting", handler.RemoveSettingFromBundle) } type webValueServiceHandler struct { @@ -250,10 +250,10 @@ func RegisterValueServiceWeb(r chi.Router, i ValueServiceHandler, middlewares .. h: i, } - r.MethodFunc("POST", "/api/v1/settings/values-save", handler.SaveValue) - r.MethodFunc("POST", "/api/v1/settings/values-get", handler.GetValue) - r.MethodFunc("POST", "/api/v1/settings/values-list", handler.ListValues) - r.MethodFunc("POST", "/api/v1/settings/values-get-by-unique-identifiers", handler.GetValueByUniqueIdentifiers) + r.MethodFunc("POST", "/api/v0/settings/values-save", handler.SaveValue) + r.MethodFunc("POST", "/api/v0/settings/values-get", handler.GetValue) + r.MethodFunc("POST", "/api/v0/settings/values-list", handler.ListValues) + r.MethodFunc("POST", "/api/v0/settings/values-get-by-unique-identifiers", handler.GetValueByUniqueIdentifiers) } type webRoleServiceHandler struct { @@ -359,10 +359,10 @@ func RegisterRoleServiceWeb(r chi.Router, i RoleServiceHandler, middlewares ...f h: i, } - r.MethodFunc("POST", "/api/v1/settings/roles-list", handler.ListRoles) - r.MethodFunc("POST", "/api/v1/settings/assignments-list", handler.ListRoleAssignments) - r.MethodFunc("POST", "/api/v1/settings/assignments-add", handler.AssignRoleToUser) - r.MethodFunc("POST", "/api/v1/settings/assignments-remove", handler.RemoveRoleFromUser) + r.MethodFunc("POST", "/api/v0/settings/roles-list", handler.ListRoles) + r.MethodFunc("POST", "/api/v0/settings/assignments-list", handler.ListRoleAssignments) + r.MethodFunc("POST", "/api/v0/settings/assignments-add", handler.AssignRoleToUser) + r.MethodFunc("POST", "/api/v0/settings/assignments-remove", handler.RemoveRoleFromUser) } type webPermissionServiceHandler struct { @@ -424,8 +424,8 @@ func RegisterPermissionServiceWeb(r chi.Router, i PermissionServiceHandler, midd h: i, } - r.MethodFunc("POST", "/api/v1/settings/permissions-list-by-resource", handler.ListPermissionsByResource) - r.MethodFunc("POST", "/api/v1/settings/permissions-get-by-id", handler.GetPermissionByID) + r.MethodFunc("POST", "/api/v0/settings/permissions-list-by-resource", handler.ListPermissionsByResource) + r.MethodFunc("POST", "/api/v0/settings/permissions-get-by-id", handler.GetPermissionByID) } // SaveBundleRequestJSONMarshaler describes the default jsonpb.Marshaler used by all diff --git a/protogen/gen/ocis/services/settings/v1/settings.swagger.json b/protogen/gen/ocis/services/settings/v1/settings.swagger.json index fd146c2f286..b0e93656de1 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.swagger.json +++ b/protogen/gen/ocis/services/settings/v1/settings.swagger.json @@ -38,7 +38,7 @@ "application/json" ], "paths": { - "/api/v1/settings/assignments-add": { + "/api/v0/settings/assignments-add": { "post": { "operationId": "RoleService_AssignRoleToUser", "responses": { @@ -70,7 +70,7 @@ ] } }, - "/api/v1/settings/assignments-list": { + "/api/v0/settings/assignments-list": { "post": { "operationId": "RoleService_ListRoleAssignments", "responses": { @@ -102,7 +102,7 @@ ] } }, - "/api/v1/settings/assignments-remove": { + "/api/v0/settings/assignments-remove": { "post": { "operationId": "RoleService_RemoveRoleFromUser", "responses": { @@ -134,7 +134,7 @@ ] } }, - "/api/v1/settings/bundle-get": { + "/api/v0/settings/bundle-get": { "post": { "operationId": "BundleService_GetBundle", "responses": { @@ -166,7 +166,7 @@ ] } }, - "/api/v1/settings/bundle-save": { + "/api/v0/settings/bundle-save": { "post": { "operationId": "BundleService_SaveBundle", "responses": { @@ -198,7 +198,7 @@ ] } }, - "/api/v1/settings/bundles-add-setting": { + "/api/v0/settings/bundles-add-setting": { "post": { "operationId": "BundleService_AddSettingToBundle", "responses": { @@ -230,7 +230,7 @@ ] } }, - "/api/v1/settings/bundles-list": { + "/api/v0/settings/bundles-list": { "post": { "operationId": "BundleService_ListBundles", "responses": { @@ -262,7 +262,7 @@ ] } }, - "/api/v1/settings/bundles-remove-setting": { + "/api/v0/settings/bundles-remove-setting": { "post": { "operationId": "BundleService_RemoveSettingFromBundle", "responses": { @@ -294,7 +294,7 @@ ] } }, - "/api/v1/settings/permissions-get-by-id": { + "/api/v0/settings/permissions-get-by-id": { "post": { "operationId": "PermissionService_GetPermissionByID", "responses": { @@ -326,7 +326,7 @@ ] } }, - "/api/v1/settings/permissions-list-by-resource": { + "/api/v0/settings/permissions-list-by-resource": { "post": { "operationId": "PermissionService_ListPermissionsByResource", "responses": { @@ -358,7 +358,7 @@ ] } }, - "/api/v1/settings/roles-list": { + "/api/v0/settings/roles-list": { "post": { "operationId": "RoleService_ListRoles", "responses": { @@ -390,7 +390,7 @@ ] } }, - "/api/v1/settings/values-get": { + "/api/v0/settings/values-get": { "post": { "operationId": "ValueService_GetValue", "responses": { @@ -422,7 +422,7 @@ ] } }, - "/api/v1/settings/values-get-by-unique-identifiers": { + "/api/v0/settings/values-get-by-unique-identifiers": { "post": { "operationId": "ValueService_GetValueByUniqueIdentifiers", "responses": { @@ -454,7 +454,7 @@ ] } }, - "/api/v1/settings/values-list": { + "/api/v0/settings/values-list": { "post": { "operationId": "ValueService_ListValues", "responses": { @@ -486,7 +486,7 @@ ] } }, - "/api/v1/settings/values-save": { + "/api/v0/settings/values-save": { "post": { "operationId": "ValueService_SaveValue", "responses": { diff --git a/protogen/proto/ocis/services/accounts/v1/accounts.proto b/protogen/proto/ocis/services/accounts/v1/accounts.proto index a5a57512690..21e15b4ff13 100644 --- a/protogen/proto/ocis/services/accounts/v1/accounts.proto +++ b/protogen/proto/ocis/services/accounts/v1/accounts.proto @@ -43,14 +43,14 @@ service AccountsService { rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { // List method maps to HTTP GET option (google.api.http) = { - post: "/api/v1/accounts/accounts-list", + post: "/api/v0/accounts/accounts-list", body: "*" }; } // Gets an account rpc GetAccount(GetAccountRequest) returns (ocis.messages.accounts.v1.Account) { option (google.api.http) = { - post: "/api/v1/accounts/accounts-get", + post: "/api/v0/accounts/accounts-get", body: "*" }; } @@ -59,7 +59,7 @@ service AccountsService { // Create maps to HTTP POST. URL path as the collection name. // HTTP request body contains the resource option (google.api.http) = { - post: "/api/v1/accounts/accounts-create" + post: "/api/v0/accounts/accounts-create" body: "*" }; } @@ -68,7 +68,7 @@ service AccountsService { // Update maps to HTTP PATCH. Resource name is mapped to a URL path. // Resource is contained in the HTTP request body option (google.api.http) = { - post: "/api/v1/accounts/accounts-update" + post: "/api/v0/accounts/accounts-update" body: "*" }; }; @@ -77,7 +77,7 @@ service AccountsService { // Delete maps to HTTP DELETE. Resource name maps to the URL path. // There is no request body option (google.api.http) = { - post: "/api/v1/accounts/accounts-delete", + post: "/api/v0/accounts/accounts-delete", body: "*" }; } @@ -88,14 +88,14 @@ service GroupsService { rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { // List method maps to HTTP GET option (google.api.http) = { - post: "/api/v1/accounts/groups-list", + post: "/api/v0/accounts/groups-list", body: "*" }; } // Gets an groups rpc GetGroup(GetGroupRequest) returns (ocis.messages.accounts.v1.Group) { option (google.api.http) = { - post: "/api/v1/accounts/groups-get", + post: "/api/v0/accounts/groups-get", body: "*" }; } @@ -104,7 +104,7 @@ service GroupsService { // Create maps to HTTP POST. URL path as the collection name. // HTTP request body contains the resource option (google.api.http) = { - post: "/api/v1/accounts/groups-create" + post: "/api/v0/accounts/groups-create" body: "*" }; } @@ -113,7 +113,7 @@ service GroupsService { // Update maps to HTTP PATCH. Resource name is mapped to a URL path. // Resource is contained in the HTTP request body option (google.api.http) = { - post: "/api/v1/accounts/groups-update" + post: "/api/v0/accounts/groups-update" body: "*" }; }; @@ -122,7 +122,7 @@ service GroupsService { // Delete maps to HTTP DELETE. Resource name maps to the URL path. // There is no request body option (google.api.http) = { - post: "/api/v1/accounts/groups-delete", + post: "/api/v0/accounts/groups-delete", body: "*" }; } @@ -136,7 +136,7 @@ service GroupsService { rpc AddMember(AddMemberRequest) returns (ocis.messages.accounts.v1.Group) { // All request parameters go into body. option (google.api.http) = { - post: "/api/v1/groups/{group_id=*}/members/$ref" + post: "/api/v0/groups/{group_id=*}/members/$ref" body: "*" }; } @@ -145,7 +145,7 @@ service GroupsService { // All request parameters go into body. option (google.api.http) = { // URLs are broken - post: "/api/v1/groups/{group_id=*}/members/{account_id}/$ref" + post: "/api/v0/groups/{group_id=*}/members/{account_id}/$ref" body: "*" }; } @@ -154,7 +154,7 @@ service GroupsService { // All request parameters go into body. option (google.api.http) = { // URLs are broken - post: "/api/v1/groups/{id=*}/members/$ref" + post: "/api/v0/groups/{id=*}/members/$ref" body: "*" }; } @@ -166,7 +166,7 @@ service IndexService { // All request parameters go into body. option (google.api.http) = { // URLs are broken - post: "/api/v1/index/rebuild" + post: "/api/v0/index/rebuild" body: "*" }; } diff --git a/protogen/proto/ocis/services/settings/v1/settings.proto b/protogen/proto/ocis/services/settings/v1/settings.proto index d6d32ce9d9e..2fb61a33ca7 100644 --- a/protogen/proto/ocis/services/settings/v1/settings.proto +++ b/protogen/proto/ocis/services/settings/v1/settings.proto @@ -36,31 +36,31 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { service BundleService { rpc SaveBundle(SaveBundleRequest) returns (SaveBundleResponse) { option (google.api.http) = { - post: "/api/v1/settings/bundle-save", + post: "/api/v0/settings/bundle-save", body: "*" }; } rpc GetBundle(GetBundleRequest) returns (GetBundleResponse) { option (google.api.http) = { - post: "/api/v1/settings/bundle-get", + post: "/api/v0/settings/bundle-get", body: "*" }; } rpc ListBundles(ListBundlesRequest) returns (ListBundlesResponse) { option (google.api.http) = { - post: "/api/v1/settings/bundles-list", + post: "/api/v0/settings/bundles-list", body: "*" }; } rpc AddSettingToBundle(AddSettingToBundleRequest) returns (AddSettingToBundleResponse) { option (google.api.http) = { - post: "/api/v1/settings/bundles-add-setting", + post: "/api/v0/settings/bundles-add-setting", body: "*" }; } rpc RemoveSettingFromBundle(RemoveSettingFromBundleRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/api/v1/settings/bundles-remove-setting", + post: "/api/v0/settings/bundles-remove-setting", body: "*" }; } @@ -69,25 +69,25 @@ service BundleService { service ValueService { rpc SaveValue(SaveValueRequest) returns (SaveValueResponse) { option (google.api.http) = { - post: "/api/v1/settings/values-save", + post: "/api/v0/settings/values-save", body: "*" }; } rpc GetValue(GetValueRequest) returns (GetValueResponse) { option (google.api.http) = { - post: "/api/v1/settings/values-get", + post: "/api/v0/settings/values-get", body: "*" }; } rpc ListValues(ListValuesRequest) returns (ListValuesResponse) { option (google.api.http) = { - post: "/api/v1/settings/values-list", + post: "/api/v0/settings/values-list", body: "*" }; } rpc GetValueByUniqueIdentifiers(GetValueByUniqueIdentifiersRequest) returns (GetValueResponse) { option (google.api.http) = { - post: "/api/v1/settings/values-get-by-unique-identifiers", + post: "/api/v0/settings/values-get-by-unique-identifiers", body: "*" }; } @@ -96,25 +96,25 @@ service ValueService { service RoleService { rpc ListRoles(ListBundlesRequest) returns (ListBundlesResponse) { option (google.api.http) = { - post: "/api/v1/settings/roles-list", + post: "/api/v0/settings/roles-list", body: "*" }; } rpc ListRoleAssignments(ListRoleAssignmentsRequest) returns (ListRoleAssignmentsResponse) { option (google.api.http) = { - post: "/api/v1/settings/assignments-list", + post: "/api/v0/settings/assignments-list", body: "*" }; } rpc AssignRoleToUser(AssignRoleToUserRequest) returns (AssignRoleToUserResponse) { option (google.api.http) = { - post: "/api/v1/settings/assignments-add", + post: "/api/v0/settings/assignments-add", body: "*" }; } rpc RemoveRoleFromUser(RemoveRoleFromUserRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/api/v1/settings/assignments-remove", + post: "/api/v0/settings/assignments-remove", body: "*" }; } @@ -123,13 +123,13 @@ service RoleService { service PermissionService { rpc ListPermissionsByResource(ListPermissionsByResourceRequest) returns (ListPermissionsByResourceResponse) { option (google.api.http) = { - post: "/api/v1/settings/permissions-list-by-resource", + post: "/api/v0/settings/permissions-list-by-resource", body: "*" }; } rpc GetPermissionByID(GetPermissionByIDRequest) returns (GetPermissionByIDResponse) { option (google.api.http) = { - post: "/api/v1/settings/permissions-get-by-id", + post: "/api/v0/settings/permissions-get-by-id", body: "*" }; } diff --git a/proxy/pkg/config/defaultconfig.go b/proxy/pkg/config/defaultconfig.go index 546a9a8be23..12bcbe806d6 100644 --- a/proxy/pkg/config/defaultconfig.go +++ b/proxy/pkg/config/defaultconfig.go @@ -132,7 +132,7 @@ func DefaultPolicies() []Policy { }, // if we were using the go micro api gateway we could look up the endpoint in the registry dynamically { - Endpoint: "/api/v1/accounts", + Endpoint: "/api/v0/accounts", Backend: "http://localhost:9181", }, // TODO the lookup needs a better mechanism @@ -141,7 +141,7 @@ func DefaultPolicies() []Policy { Backend: "http://localhost:9181", }, { - Endpoint: "/api/v1/settings", + Endpoint: "/api/v0/settings", Backend: "http://localhost:9190", }, { diff --git a/settings/ui/client/settings/index.js b/settings/ui/client/settings/index.js index dbc9ea5d83a..6f0781ef81b 100644 --- a/settings/ui/client/settings/index.js +++ b/settings/ui/client/settings/index.js @@ -38,7 +38,7 @@ export const request = (method, url, body, queryParameters, form, config) => { export const RoleService_AssignRoleToUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-add' + let path = '/api/v0/settings/assignments-add' let body let queryParameters = {} let form = {} @@ -56,7 +56,7 @@ export const RoleService_AssignRoleToUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_AssignRoleToUser_RAW_URL = function() { - return '/api/v1/settings/assignments-add' + return '/api/v0/settings/assignments-add' } export const RoleService_AssignRoleToUser_TYPE = function() { return 'post' @@ -64,7 +64,7 @@ export const RoleService_AssignRoleToUser_TYPE = function() { export const RoleService_AssignRoleToUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-add' + let path = '/api/v0/settings/assignments-add' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -84,7 +84,7 @@ export const RoleService_AssignRoleToUserURL = function(parameters = {}) { export const RoleService_ListRoleAssignments = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-list' + let path = '/api/v0/settings/assignments-list' let body let queryParameters = {} let form = {} @@ -102,7 +102,7 @@ export const RoleService_ListRoleAssignments = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoleAssignments_RAW_URL = function() { - return '/api/v1/settings/assignments-list' + return '/api/v0/settings/assignments-list' } export const RoleService_ListRoleAssignments_TYPE = function() { return 'post' @@ -110,7 +110,7 @@ export const RoleService_ListRoleAssignments_TYPE = function() { export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-list' + let path = '/api/v0/settings/assignments-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -130,7 +130,7 @@ export const RoleService_ListRoleAssignmentsURL = function(parameters = {}) { export const RoleService_RemoveRoleFromUser = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/assignments-remove' + let path = '/api/v0/settings/assignments-remove' let body let queryParameters = {} let form = {} @@ -148,7 +148,7 @@ export const RoleService_RemoveRoleFromUser = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_RemoveRoleFromUser_RAW_URL = function() { - return '/api/v1/settings/assignments-remove' + return '/api/v0/settings/assignments-remove' } export const RoleService_RemoveRoleFromUser_TYPE = function() { return 'post' @@ -156,7 +156,7 @@ export const RoleService_RemoveRoleFromUser_TYPE = function() { export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/assignments-remove' + let path = '/api/v0/settings/assignments-remove' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -176,7 +176,7 @@ export const RoleService_RemoveRoleFromUserURL = function(parameters = {}) { export const BundleService_GetBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundle-get' + let path = '/api/v0/settings/bundle-get' let body let queryParameters = {} let form = {} @@ -194,7 +194,7 @@ export const BundleService_GetBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_GetBundle_RAW_URL = function() { - return '/api/v1/settings/bundle-get' + return '/api/v0/settings/bundle-get' } export const BundleService_GetBundle_TYPE = function() { return 'post' @@ -202,7 +202,7 @@ export const BundleService_GetBundle_TYPE = function() { export const BundleService_GetBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundle-get' + let path = '/api/v0/settings/bundle-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -222,7 +222,7 @@ export const BundleService_GetBundleURL = function(parameters = {}) { export const BundleService_SaveBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundle-save' + let path = '/api/v0/settings/bundle-save' let body let queryParameters = {} let form = {} @@ -240,7 +240,7 @@ export const BundleService_SaveBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_SaveBundle_RAW_URL = function() { - return '/api/v1/settings/bundle-save' + return '/api/v0/settings/bundle-save' } export const BundleService_SaveBundle_TYPE = function() { return 'post' @@ -248,7 +248,7 @@ export const BundleService_SaveBundle_TYPE = function() { export const BundleService_SaveBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundle-save' + let path = '/api/v0/settings/bundle-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -268,7 +268,7 @@ export const BundleService_SaveBundleURL = function(parameters = {}) { export const BundleService_AddSettingToBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-add-setting' + let path = '/api/v0/settings/bundles-add-setting' let body let queryParameters = {} let form = {} @@ -286,7 +286,7 @@ export const BundleService_AddSettingToBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_AddSettingToBundle_RAW_URL = function() { - return '/api/v1/settings/bundles-add-setting' + return '/api/v0/settings/bundles-add-setting' } export const BundleService_AddSettingToBundle_TYPE = function() { return 'post' @@ -294,7 +294,7 @@ export const BundleService_AddSettingToBundle_TYPE = function() { export const BundleService_AddSettingToBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-add-setting' + let path = '/api/v0/settings/bundles-add-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -314,7 +314,7 @@ export const BundleService_AddSettingToBundleURL = function(parameters = {}) { export const BundleService_ListBundles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-list' + let path = '/api/v0/settings/bundles-list' let body let queryParameters = {} let form = {} @@ -332,7 +332,7 @@ export const BundleService_ListBundles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_ListBundles_RAW_URL = function() { - return '/api/v1/settings/bundles-list' + return '/api/v0/settings/bundles-list' } export const BundleService_ListBundles_TYPE = function() { return 'post' @@ -340,7 +340,7 @@ export const BundleService_ListBundles_TYPE = function() { export const BundleService_ListBundlesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-list' + let path = '/api/v0/settings/bundles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -360,7 +360,7 @@ export const BundleService_ListBundlesURL = function(parameters = {}) { export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/bundles-remove-setting' + let path = '/api/v0/settings/bundles-remove-setting' let body let queryParameters = {} let form = {} @@ -378,7 +378,7 @@ export const BundleService_RemoveSettingFromBundle = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const BundleService_RemoveSettingFromBundle_RAW_URL = function() { - return '/api/v1/settings/bundles-remove-setting' + return '/api/v0/settings/bundles-remove-setting' } export const BundleService_RemoveSettingFromBundle_TYPE = function() { return 'post' @@ -386,7 +386,7 @@ export const BundleService_RemoveSettingFromBundle_TYPE = function() { export const BundleService_RemoveSettingFromBundleURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/bundles-remove-setting' + let path = '/api/v0/settings/bundles-remove-setting' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -406,7 +406,7 @@ export const BundleService_RemoveSettingFromBundleURL = function(parameters = {} export const PermissionService_GetPermissionByID = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/permissions-get-by-id' + let path = '/api/v0/settings/permissions-get-by-id' let body let queryParameters = {} let form = {} @@ -424,7 +424,7 @@ export const PermissionService_GetPermissionByID = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const PermissionService_GetPermissionByID_RAW_URL = function() { - return '/api/v1/settings/permissions-get-by-id' + return '/api/v0/settings/permissions-get-by-id' } export const PermissionService_GetPermissionByID_TYPE = function() { return 'post' @@ -432,7 +432,7 @@ export const PermissionService_GetPermissionByID_TYPE = function() { export const PermissionService_GetPermissionByIDURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/permissions-get-by-id' + let path = '/api/v0/settings/permissions-get-by-id' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -452,7 +452,7 @@ export const PermissionService_GetPermissionByIDURL = function(parameters = {}) export const PermissionService_ListPermissionsByResource = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/permissions-list-by-resource' + let path = '/api/v0/settings/permissions-list-by-resource' let body let queryParameters = {} let form = {} @@ -470,7 +470,7 @@ export const PermissionService_ListPermissionsByResource = function(parameters = return request('post', domain + path, body, queryParameters, form, config) } export const PermissionService_ListPermissionsByResource_RAW_URL = function() { - return '/api/v1/settings/permissions-list-by-resource' + return '/api/v0/settings/permissions-list-by-resource' } export const PermissionService_ListPermissionsByResource_TYPE = function() { return 'post' @@ -478,7 +478,7 @@ export const PermissionService_ListPermissionsByResource_TYPE = function() { export const PermissionService_ListPermissionsByResourceURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/permissions-list-by-resource' + let path = '/api/v0/settings/permissions-list-by-resource' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -498,7 +498,7 @@ export const PermissionService_ListPermissionsByResourceURL = function(parameter export const RoleService_ListRoles = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/roles-list' + let path = '/api/v0/settings/roles-list' let body let queryParameters = {} let form = {} @@ -516,7 +516,7 @@ export const RoleService_ListRoles = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const RoleService_ListRoles_RAW_URL = function() { - return '/api/v1/settings/roles-list' + return '/api/v0/settings/roles-list' } export const RoleService_ListRoles_TYPE = function() { return 'post' @@ -524,7 +524,7 @@ export const RoleService_ListRoles_TYPE = function() { export const RoleService_ListRolesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/roles-list' + let path = '/api/v0/settings/roles-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -544,7 +544,7 @@ export const RoleService_ListRolesURL = function(parameters = {}) { export const ValueService_GetValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-get' + let path = '/api/v0/settings/values-get' let body let queryParameters = {} let form = {} @@ -562,7 +562,7 @@ export const ValueService_GetValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValue_RAW_URL = function() { - return '/api/v1/settings/values-get' + return '/api/v0/settings/values-get' } export const ValueService_GetValue_TYPE = function() { return 'post' @@ -570,7 +570,7 @@ export const ValueService_GetValue_TYPE = function() { export const ValueService_GetValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-get' + let path = '/api/v0/settings/values-get' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -590,7 +590,7 @@ export const ValueService_GetValueURL = function(parameters = {}) { export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-get-by-unique-identifiers' + let path = '/api/v0/settings/values-get-by-unique-identifiers' let body let queryParameters = {} let form = {} @@ -608,7 +608,7 @@ export const ValueService_GetValueByUniqueIdentifiers = function(parameters = {} return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_GetValueByUniqueIdentifiers_RAW_URL = function() { - return '/api/v1/settings/values-get-by-unique-identifiers' + return '/api/v0/settings/values-get-by-unique-identifiers' } export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { return 'post' @@ -616,7 +616,7 @@ export const ValueService_GetValueByUniqueIdentifiers_TYPE = function() { export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-get-by-unique-identifiers' + let path = '/api/v0/settings/values-get-by-unique-identifiers' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -636,7 +636,7 @@ export const ValueService_GetValueByUniqueIdentifiersURL = function(parameters = export const ValueService_ListValues = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-list' + let path = '/api/v0/settings/values-list' let body let queryParameters = {} let form = {} @@ -654,7 +654,7 @@ export const ValueService_ListValues = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_ListValues_RAW_URL = function() { - return '/api/v1/settings/values-list' + return '/api/v0/settings/values-list' } export const ValueService_ListValues_TYPE = function() { return 'post' @@ -662,7 +662,7 @@ export const ValueService_ListValues_TYPE = function() { export const ValueService_ListValuesURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-list' + let path = '/api/v0/settings/values-list' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] @@ -682,7 +682,7 @@ export const ValueService_ListValuesURL = function(parameters = {}) { export const ValueService_SaveValue = function(parameters = {}) { const domain = parameters.$domain ? parameters.$domain : getDomain() const config = parameters.$config - let path = '/api/v1/settings/values-save' + let path = '/api/v0/settings/values-save' let body let queryParameters = {} let form = {} @@ -700,7 +700,7 @@ export const ValueService_SaveValue = function(parameters = {}) { return request('post', domain + path, body, queryParameters, form, config) } export const ValueService_SaveValue_RAW_URL = function() { - return '/api/v1/settings/values-save' + return '/api/v0/settings/values-save' } export const ValueService_SaveValue_TYPE = function() { return 'post' @@ -708,7 +708,7 @@ export const ValueService_SaveValue_TYPE = function() { export const ValueService_SaveValueURL = function(parameters = {}) { let queryParameters = {} const domain = parameters.$domain ? parameters.$domain : getDomain() - let path = '/api/v1/settings/values-save' + let path = '/api/v0/settings/values-save' if (parameters.$queryParameters) { Object.keys(parameters.$queryParameters).forEach(function(parameterName) { queryParameters[parameterName] = parameters.$queryParameters[parameterName] From 2593ff0f7001499d20954dbda25ee8e92e87d0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 12 Jan 2022 17:25:02 +0100 Subject: [PATCH 09/20] Add proto files for store service and include generated code --- .../extensions/ocis/messages/store/v1/grpc.md | 121 +++ .../extensions/ocis/services/store/v1/grpc.md | 139 +++ .../gen/ocis/messages/store/v1/store.pb.go | 670 +++++++++++++ .../ocis/messages/store/v1/store.pb.micro.go | 15 + .../ocis/messages/store/v1/store.swagger.json | 43 + .../gen/ocis/services/store/v1/store.pb.go | 929 ++++++++++++++++++ .../ocis/services/store/v1/store.pb.micro.go | 249 +++++ .../ocis/services/store/v1/store.swagger.json | 242 +++++ protogen/proto/buf.gen.yaml | 4 +- .../proto/ocis/messages/store/v1/store.proto | 56 ++ .../proto/ocis/services/store/v1/store.proto | 87 ++ 11 files changed, 2554 insertions(+), 1 deletion(-) create mode 100644 protogen/docs/extensions/ocis/messages/store/v1/grpc.md create mode 100644 protogen/docs/extensions/ocis/services/store/v1/grpc.md create mode 100644 protogen/gen/ocis/messages/store/v1/store.pb.go create mode 100644 protogen/gen/ocis/messages/store/v1/store.pb.micro.go create mode 100644 protogen/gen/ocis/messages/store/v1/store.swagger.json create mode 100644 protogen/gen/ocis/services/store/v1/store.pb.go create mode 100644 protogen/gen/ocis/services/store/v1/store.pb.micro.go create mode 100644 protogen/gen/ocis/services/store/v1/store.swagger.json create mode 100644 protogen/proto/ocis/messages/store/v1/store.proto create mode 100644 protogen/proto/ocis/services/store/v1/store.proto diff --git a/protogen/docs/extensions/ocis/messages/store/v1/grpc.md b/protogen/docs/extensions/ocis/messages/store/v1/grpc.md new file mode 100644 index 00000000000..b092553d14a --- /dev/null +++ b/protogen/docs/extensions/ocis/messages/store/v1/grpc.md @@ -0,0 +1,121 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/messages/store/v1/store.proto + +### DeleteOptions + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| database | [string](#string) | | | +| table | [string](#string) | | | + +### Field + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [string](#string) | | type of value e.g string, int, int64, bool, float64 | +| value | [string](#string) | | the actual value | + +### ListOptions + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| database | [string](#string) | | | +| table | [string](#string) | | | +| prefix | [string](#string) | | | +| suffix | [string](#string) | | | +| limit | [uint64](#uint64) | | | +| offset | [uint64](#uint64) | | | + +### ReadOptions + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| database | [string](#string) | | | +| table | [string](#string) | | | +| prefix | [bool](#bool) | | | +| suffix | [bool](#bool) | | | +| limit | [uint64](#uint64) | | | +| offset | [uint64](#uint64) | | | +| where | [ReadOptions.WhereEntry](#readoptionswhereentry) | repeated | | + +### ReadOptions.WhereEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Field](#field) | | | + +### Record + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | key of the recorda | +| value | [bytes](#bytes) | | value in the record | +| expiry | [int64](#int64) | | time.Duration (signed int64 nanoseconds) | +| metadata | [Record.MetadataEntry](#recordmetadataentry) | repeated | the associated metadata | + +### Record.MetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Field](#field) | | | + +### WriteOptions + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| database | [string](#string) | | | +| table | [string](#string) | | | +| expiry | [int64](#int64) | | time.Time | +| ttl | [int64](#int64) | | time.Duration | + + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/docs/extensions/ocis/services/store/v1/grpc.md b/protogen/docs/extensions/ocis/services/store/v1/grpc.md new file mode 100644 index 00000000000..0c4d61310b5 --- /dev/null +++ b/protogen/docs/extensions/ocis/services/store/v1/grpc.md @@ -0,0 +1,139 @@ +--- +title: "GRPC API" +date: 2018-05-02T00:00:00+00:00 +weight: 50 +geekdocRepo: https://github.com/owncloud/ocis-thumbnails +geekdocEditPath: edit/master/docs +geekdocFilePath: grpc.md +--- + +{{< toc >}} + + + +## ocis/services/store/v1/store.proto + +### DatabasesRequest + + + + +### DatabasesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| databases | [string](#string) | repeated | | + +### DeleteRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| options | [ocis.messages.store.v1.DeleteOptions](../../../messages/store/v1/grpc.md#deleteoptions) | | | + +### DeleteResponse + + + + +### ListRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| options | [ocis.messages.store.v1.ListOptions](../../../messages/store/v1/grpc.md#listoptions) | | | + +### ListResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| keys | [string](#string) | repeated | | + +### ReadRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| options | [ocis.messages.store.v1.ReadOptions](../../../messages/store/v1/grpc.md#readoptions) | | | + +### ReadResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| records | [ocis.messages.store.v1.Record](../../../messages/store/v1/grpc.md#record) | repeated | | + +### TablesRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| database | [string](#string) | | | + +### TablesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tables | [string](#string) | repeated | | + +### WriteRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| record | [ocis.messages.store.v1.Record](../../../messages/store/v1/grpc.md#record) | | | +| options | [ocis.messages.store.v1.WriteOptions](../../../messages/store/v1/grpc.md#writeoptions) | | | + +### WriteResponse + + + + + +### Store + + + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Read | [ReadRequest](#readrequest) | [ReadResponse](#readresponse) | | +| Write | [WriteRequest](#writerequest) | [WriteResponse](#writeresponse) | | +| Delete | [DeleteRequest](#deleterequest) | [DeleteResponse](#deleteresponse) | | +| List | [ListRequest](#listrequest) | [ListResponse](#listresponse) stream | | +| Databases | [DatabasesRequest](#databasesrequest) | [DatabasesResponse](#databasesresponse) | | +| Tables | [TablesRequest](#tablesrequest) | [TablesResponse](#tablesresponse) | | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | +| ----------- | ----- | --- | ---- | +| {{< div id="double" content="double" >}} | | double | double | +| {{< div id="float" content="float" >}} | | float | float | +| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | +| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | +| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | +| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | +| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | +| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | +| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | +| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | +| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | +| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | +| {{< div id="bool" content="bool" >}} | | bool | boolean | +| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | +| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | + diff --git a/protogen/gen/ocis/messages/store/v1/store.pb.go b/protogen/gen/ocis/messages/store/v1/store.pb.go new file mode 100644 index 00000000000..a3d7f4ad746 --- /dev/null +++ b/protogen/gen/ocis/messages/store/v1/store.pb.go @@ -0,0 +1,670 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/messages/store/v1/store.proto + +package v1 + +import ( + 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) +) + +type Field struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // type of value e.g string, int, int64, bool, float64 + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // the actual value + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Field) Reset() { + *x = Field{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field) ProtoMessage() {} + +func (x *Field) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 Field.ProtoReflect.Descriptor instead. +func (*Field) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{0} +} + +func (x *Field) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Field) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type Record struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // key of the recorda + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // value in the record + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // time.Duration (signed int64 nanoseconds) + Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` + // the associated metadata + Metadata map[string]*Field `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Record) Reset() { + *x = Record{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Record) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Record) ProtoMessage() {} + +func (x *Record) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 Record.ProtoReflect.Descriptor instead. +func (*Record) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{1} +} + +func (x *Record) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Record) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *Record) GetExpiry() int64 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *Record) GetMetadata() map[string]*Field { + if x != nil { + return x.Metadata + } + return nil +} + +type ReadOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` + Prefix bool `protobuf:"varint,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + Suffix bool `protobuf:"varint,4,opt,name=suffix,proto3" json:"suffix,omitempty"` + Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` + Offset uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"` + Where map[string]*Field `protobuf:"bytes,7,rep,name=where,proto3" json:"where,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ReadOptions) Reset() { + *x = ReadOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadOptions) ProtoMessage() {} + +func (x *ReadOptions) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 ReadOptions.ProtoReflect.Descriptor instead. +func (*ReadOptions) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadOptions) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *ReadOptions) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *ReadOptions) GetPrefix() bool { + if x != nil { + return x.Prefix + } + return false +} + +func (x *ReadOptions) GetSuffix() bool { + if x != nil { + return x.Suffix + } + return false +} + +func (x *ReadOptions) GetLimit() uint64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ReadOptions) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *ReadOptions) GetWhere() map[string]*Field { + if x != nil { + return x.Where + } + return nil +} + +type WriteOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` + // time.Time + Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` + // time.Duration + Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"` +} + +func (x *WriteOptions) Reset() { + *x = WriteOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteOptions) ProtoMessage() {} + +func (x *WriteOptions) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 WriteOptions.ProtoReflect.Descriptor instead. +func (*WriteOptions) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{3} +} + +func (x *WriteOptions) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *WriteOptions) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *WriteOptions) GetExpiry() int64 { + if x != nil { + return x.Expiry + } + return 0 +} + +func (x *WriteOptions) GetTtl() int64 { + if x != nil { + return x.Ttl + } + return 0 +} + +type DeleteOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` +} + +func (x *DeleteOptions) Reset() { + *x = DeleteOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOptions) ProtoMessage() {} + +func (x *DeleteOptions) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 DeleteOptions.ProtoReflect.Descriptor instead. +func (*DeleteOptions) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteOptions) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *DeleteOptions) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +type ListOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` + Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` + Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` + Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` + Offset uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"` +} + +func (x *ListOptions) Reset() { + *x = ListOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_messages_store_v1_store_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListOptions) ProtoMessage() {} + +func (x *ListOptions) ProtoReflect() protoreflect.Message { + mi := &file_ocis_messages_store_v1_store_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 ListOptions.ProtoReflect.Descriptor instead. +func (*ListOptions) Descriptor() ([]byte, []int) { + return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{5} +} + +func (x *ListOptions) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *ListOptions) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *ListOptions) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +func (x *ListOptions) GetSuffix() string { + if x != nil { + return x.Suffix + } + return "" +} + +func (x *ListOptions) GetLimit() uint64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListOptions) GetOffset() uint64 { + if x != nil { + return x.Offset + } + return 0 +} + +var File_ocis_messages_store_v1_store_proto protoreflect.FileDescriptor + +var file_ocis_messages_store_v1_store_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x31, 0x0a, 0x05, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0xee, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, + 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x5a, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xbc, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, + 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x12, 0x44, 0x0a, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x57, 0x68, 0x65, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x1a, 0x57, 0x0a, 0x0a, 0x57, 0x68, 0x65, 0x72, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x6a, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0x41, 0x0a, 0x0d, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x9d, + 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x3e, + 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_messages_store_v1_store_proto_rawDescOnce sync.Once + file_ocis_messages_store_v1_store_proto_rawDescData = file_ocis_messages_store_v1_store_proto_rawDesc +) + +func file_ocis_messages_store_v1_store_proto_rawDescGZIP() []byte { + file_ocis_messages_store_v1_store_proto_rawDescOnce.Do(func() { + file_ocis_messages_store_v1_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_store_v1_store_proto_rawDescData) + }) + return file_ocis_messages_store_v1_store_proto_rawDescData +} + +var file_ocis_messages_store_v1_store_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_ocis_messages_store_v1_store_proto_goTypes = []interface{}{ + (*Field)(nil), // 0: ocis.messages.store.v1.Field + (*Record)(nil), // 1: ocis.messages.store.v1.Record + (*ReadOptions)(nil), // 2: ocis.messages.store.v1.ReadOptions + (*WriteOptions)(nil), // 3: ocis.messages.store.v1.WriteOptions + (*DeleteOptions)(nil), // 4: ocis.messages.store.v1.DeleteOptions + (*ListOptions)(nil), // 5: ocis.messages.store.v1.ListOptions + nil, // 6: ocis.messages.store.v1.Record.MetadataEntry + nil, // 7: ocis.messages.store.v1.ReadOptions.WhereEntry +} +var file_ocis_messages_store_v1_store_proto_depIdxs = []int32{ + 6, // 0: ocis.messages.store.v1.Record.metadata:type_name -> ocis.messages.store.v1.Record.MetadataEntry + 7, // 1: ocis.messages.store.v1.ReadOptions.where:type_name -> ocis.messages.store.v1.ReadOptions.WhereEntry + 0, // 2: ocis.messages.store.v1.Record.MetadataEntry.value:type_name -> ocis.messages.store.v1.Field + 0, // 3: ocis.messages.store.v1.ReadOptions.WhereEntry.value:type_name -> ocis.messages.store.v1.Field + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_ocis_messages_store_v1_store_proto_init() } +func file_ocis_messages_store_v1_store_proto_init() { + if File_ocis_messages_store_v1_store_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_messages_store_v1_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_store_v1_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Record); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_store_v1_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_store_v1_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_store_v1_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_messages_store_v1_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListOptions); 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_ocis_messages_store_v1_store_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ocis_messages_store_v1_store_proto_goTypes, + DependencyIndexes: file_ocis_messages_store_v1_store_proto_depIdxs, + MessageInfos: file_ocis_messages_store_v1_store_proto_msgTypes, + }.Build() + File_ocis_messages_store_v1_store_proto = out.File + file_ocis_messages_store_v1_store_proto_rawDesc = nil + file_ocis_messages_store_v1_store_proto_goTypes = nil + file_ocis_messages_store_v1_store_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/messages/store/v1/store.pb.micro.go b/protogen/gen/ocis/messages/store/v1/store.pb.micro.go new file mode 100644 index 00000000000..ecdb09726fb --- /dev/null +++ b/protogen/gen/ocis/messages/store/v1/store.pb.micro.go @@ -0,0 +1,15 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/messages/store/v1/store.proto + +package v1 + +import ( + fmt "fmt" + proto "google.golang.org/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf diff --git a/protogen/gen/ocis/messages/store/v1/store.swagger.json b/protogen/gen/ocis/messages/store/v1/store.swagger.json new file mode 100644 index 00000000000..f770774cc3b --- /dev/null +++ b/protogen/gen/ocis/messages/store/v1/store.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "ocis/messages/store/v1/store.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/protogen/gen/ocis/services/store/v1/store.pb.go b/protogen/gen/ocis/services/store/v1/store.pb.go new file mode 100644 index 00000000000..1e20e0580b1 --- /dev/null +++ b/protogen/gen/ocis/services/store/v1/store.pb.go @@ -0,0 +1,929 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.17.3 +// source: ocis/services/store/v1/store.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + 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) +) + +type ReadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Options *v1.ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *ReadRequest) Reset() { + *x = ReadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequest) ProtoMessage() {} + +func (x *ReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 ReadRequest.ProtoReflect.Descriptor instead. +func (*ReadRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{0} +} + +func (x *ReadRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ReadRequest) GetOptions() *v1.ReadOptions { + if x != nil { + return x.Options + } + return nil +} + +type ReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Records []*v1.Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` +} + +func (x *ReadResponse) Reset() { + *x = ReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponse) ProtoMessage() {} + +func (x *ReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 ReadResponse.ProtoReflect.Descriptor instead. +func (*ReadResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{1} +} + +func (x *ReadResponse) GetRecords() []*v1.Record { + if x != nil { + return x.Records + } + return nil +} + +type WriteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Record *v1.Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + Options *v1.WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *WriteRequest) Reset() { + *x = WriteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteRequest) ProtoMessage() {} + +func (x *WriteRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 WriteRequest.ProtoReflect.Descriptor instead. +func (*WriteRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{2} +} + +func (x *WriteRequest) GetRecord() *v1.Record { + if x != nil { + return x.Record + } + return nil +} + +func (x *WriteRequest) GetOptions() *v1.WriteOptions { + if x != nil { + return x.Options + } + return nil +} + +type WriteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteResponse) Reset() { + *x = WriteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteResponse) ProtoMessage() {} + +func (x *WriteResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 WriteResponse.ProtoReflect.Descriptor instead. +func (*WriteResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{3} +} + +type DeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Options *v1.DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *DeleteRequest) Reset() { + *x = DeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRequest) ProtoMessage() {} + +func (x *DeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 DeleteRequest.ProtoReflect.Descriptor instead. +func (*DeleteRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *DeleteRequest) GetOptions() *v1.DeleteOptions { + if x != nil { + return x.Options + } + return nil +} + +type DeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteResponse) Reset() { + *x = DeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResponse) ProtoMessage() {} + +func (x *DeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 DeleteResponse.ProtoReflect.Descriptor instead. +func (*DeleteResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{5} +} + +type ListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Options *v1.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{6} +} + +func (x *ListRequest) GetOptions() *v1.ListOptions { + if x != nil { + return x.Options + } + return nil +} + +type ListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{7} +} + +func (x *ListResponse) GetKeys() []string { + if x != nil { + return x.Keys + } + return nil +} + +type DatabasesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DatabasesRequest) Reset() { + *x = DatabasesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatabasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatabasesRequest) ProtoMessage() {} + +func (x *DatabasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 DatabasesRequest.ProtoReflect.Descriptor instead. +func (*DatabasesRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{8} +} + +type DatabasesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` +} + +func (x *DatabasesResponse) Reset() { + *x = DatabasesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DatabasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DatabasesResponse) ProtoMessage() {} + +func (x *DatabasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 DatabasesResponse.ProtoReflect.Descriptor instead. +func (*DatabasesResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{9} +} + +func (x *DatabasesResponse) GetDatabases() []string { + if x != nil { + return x.Databases + } + return nil +} + +type TablesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` +} + +func (x *TablesRequest) Reset() { + *x = TablesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesRequest) ProtoMessage() {} + +func (x *TablesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 TablesRequest.ProtoReflect.Descriptor instead. +func (*TablesRequest) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{10} +} + +func (x *TablesRequest) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +type TablesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tables []string `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"` +} + +func (x *TablesResponse) Reset() { + *x = TablesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ocis_services_store_v1_store_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TablesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TablesResponse) ProtoMessage() {} + +func (x *TablesResponse) ProtoReflect() protoreflect.Message { + mi := &file_ocis_services_store_v1_store_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 TablesResponse.ProtoReflect.Descriptor instead. +func (*TablesResponse) Descriptor() ([]byte, []int) { + return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{11} +} + +func (x *TablesResponse) GetTables() []string { + if x != nil { + return x.Tables + } + return nil +} + +var File_ocis_services_store_v1_store_proto protoreflect.FileDescriptor + +var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x6f, 0x63, + 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, + 0x22, 0x5e, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x48, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x0b, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x4a, 0x04, 0x08, 0x01, + 0x10, 0x02, 0x22, 0x12, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x31, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x32, 0xa5, 0x04, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x52, 0x65, + 0x61, 0x64, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x56, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x09, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, + 0x06, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xdb, 0x02, 0x5a, 0x3b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x9a, 0x02, 0x12, 0xb3, 0x01, 0x0a, + 0x1d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x47, + 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, + 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, + 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, + 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, 0x30, + 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x0a, 0x10, 0x44, 0x65, + 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x26, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ocis_services_store_v1_store_proto_rawDescOnce sync.Once + file_ocis_services_store_v1_store_proto_rawDescData = file_ocis_services_store_v1_store_proto_rawDesc +) + +func file_ocis_services_store_v1_store_proto_rawDescGZIP() []byte { + file_ocis_services_store_v1_store_proto_rawDescOnce.Do(func() { + file_ocis_services_store_v1_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_store_v1_store_proto_rawDescData) + }) + return file_ocis_services_store_v1_store_proto_rawDescData +} + +var file_ocis_services_store_v1_store_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ocis_services_store_v1_store_proto_goTypes = []interface{}{ + (*ReadRequest)(nil), // 0: ocis.services.store.v1.ReadRequest + (*ReadResponse)(nil), // 1: ocis.services.store.v1.ReadResponse + (*WriteRequest)(nil), // 2: ocis.services.store.v1.WriteRequest + (*WriteResponse)(nil), // 3: ocis.services.store.v1.WriteResponse + (*DeleteRequest)(nil), // 4: ocis.services.store.v1.DeleteRequest + (*DeleteResponse)(nil), // 5: ocis.services.store.v1.DeleteResponse + (*ListRequest)(nil), // 6: ocis.services.store.v1.ListRequest + (*ListResponse)(nil), // 7: ocis.services.store.v1.ListResponse + (*DatabasesRequest)(nil), // 8: ocis.services.store.v1.DatabasesRequest + (*DatabasesResponse)(nil), // 9: ocis.services.store.v1.DatabasesResponse + (*TablesRequest)(nil), // 10: ocis.services.store.v1.TablesRequest + (*TablesResponse)(nil), // 11: ocis.services.store.v1.TablesResponse + (*v1.ReadOptions)(nil), // 12: ocis.messages.store.v1.ReadOptions + (*v1.Record)(nil), // 13: ocis.messages.store.v1.Record + (*v1.WriteOptions)(nil), // 14: ocis.messages.store.v1.WriteOptions + (*v1.DeleteOptions)(nil), // 15: ocis.messages.store.v1.DeleteOptions + (*v1.ListOptions)(nil), // 16: ocis.messages.store.v1.ListOptions +} +var file_ocis_services_store_v1_store_proto_depIdxs = []int32{ + 12, // 0: ocis.services.store.v1.ReadRequest.options:type_name -> ocis.messages.store.v1.ReadOptions + 13, // 1: ocis.services.store.v1.ReadResponse.records:type_name -> ocis.messages.store.v1.Record + 13, // 2: ocis.services.store.v1.WriteRequest.record:type_name -> ocis.messages.store.v1.Record + 14, // 3: ocis.services.store.v1.WriteRequest.options:type_name -> ocis.messages.store.v1.WriteOptions + 15, // 4: ocis.services.store.v1.DeleteRequest.options:type_name -> ocis.messages.store.v1.DeleteOptions + 16, // 5: ocis.services.store.v1.ListRequest.options:type_name -> ocis.messages.store.v1.ListOptions + 0, // 6: ocis.services.store.v1.Store.Read:input_type -> ocis.services.store.v1.ReadRequest + 2, // 7: ocis.services.store.v1.Store.Write:input_type -> ocis.services.store.v1.WriteRequest + 4, // 8: ocis.services.store.v1.Store.Delete:input_type -> ocis.services.store.v1.DeleteRequest + 6, // 9: ocis.services.store.v1.Store.List:input_type -> ocis.services.store.v1.ListRequest + 8, // 10: ocis.services.store.v1.Store.Databases:input_type -> ocis.services.store.v1.DatabasesRequest + 10, // 11: ocis.services.store.v1.Store.Tables:input_type -> ocis.services.store.v1.TablesRequest + 1, // 12: ocis.services.store.v1.Store.Read:output_type -> ocis.services.store.v1.ReadResponse + 3, // 13: ocis.services.store.v1.Store.Write:output_type -> ocis.services.store.v1.WriteResponse + 5, // 14: ocis.services.store.v1.Store.Delete:output_type -> ocis.services.store.v1.DeleteResponse + 7, // 15: ocis.services.store.v1.Store.List:output_type -> ocis.services.store.v1.ListResponse + 9, // 16: ocis.services.store.v1.Store.Databases:output_type -> ocis.services.store.v1.DatabasesResponse + 11, // 17: ocis.services.store.v1.Store.Tables:output_type -> ocis.services.store.v1.TablesResponse + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] 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_ocis_services_store_v1_store_proto_init() } +func file_ocis_services_store_v1_store_proto_init() { + if File_ocis_services_store_v1_store_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ocis_services_store_v1_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatabasesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatabasesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ocis_services_store_v1_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TablesResponse); 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_ocis_services_store_v1_store_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ocis_services_store_v1_store_proto_goTypes, + DependencyIndexes: file_ocis_services_store_v1_store_proto_depIdxs, + MessageInfos: file_ocis_services_store_v1_store_proto_msgTypes, + }.Build() + File_ocis_services_store_v1_store_proto = out.File + file_ocis_services_store_v1_store_proto_rawDesc = nil + file_ocis_services_store_v1_store_proto_goTypes = nil + file_ocis_services_store_v1_store_proto_depIdxs = nil +} diff --git a/protogen/gen/ocis/services/store/v1/store.pb.micro.go b/protogen/gen/ocis/services/store/v1/store.pb.micro.go new file mode 100644 index 00000000000..d9dd1ce4e38 --- /dev/null +++ b/protogen/gen/ocis/services/store/v1/store.pb.micro.go @@ -0,0 +1,249 @@ +// Code generated by protoc-gen-micro. DO NOT EDIT. +// source: ocis/services/store/v1/store.proto + +package v1 + +import ( + fmt "fmt" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + proto "google.golang.org/protobuf/proto" + math "math" +) + +import ( + context "context" + api "go-micro.dev/v4/api" + client "go-micro.dev/v4/client" + server "go-micro.dev/v4/server" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// Reference imports to suppress errors if they are not otherwise used. +var _ api.Endpoint +var _ context.Context +var _ client.Option +var _ server.Option + +// Api Endpoints for Store service + +func NewStoreEndpoints() []*api.Endpoint { + return []*api.Endpoint{} +} + +// Client API for Store service + +type StoreService interface { + Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) + Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) + Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) + List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error) + Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) + Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) +} + +type storeService struct { + c client.Client + name string +} + +func NewStoreService(name string, c client.Client) StoreService { + return &storeService{ + c: c, + name: name, + } +} + +func (c *storeService) Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) { + req := c.c.NewRequest(c.name, "Store.Read", in) + out := new(ReadResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeService) Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) { + req := c.c.NewRequest(c.name, "Store.Write", in) + out := new(WriteResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeService) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) { + req := c.c.NewRequest(c.name, "Store.Delete", in) + out := new(DeleteResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error) { + req := c.c.NewRequest(c.name, "Store.List", &ListRequest{}) + stream, err := c.c.Stream(ctx, req, opts...) + if err != nil { + return nil, err + } + if err := stream.Send(in); err != nil { + return nil, err + } + return &storeServiceList{stream}, nil +} + +type Store_ListService interface { + Context() context.Context + SendMsg(interface{}) error + RecvMsg(interface{}) error + Close() error + Recv() (*ListResponse, error) +} + +type storeServiceList struct { + stream client.Stream +} + +func (x *storeServiceList) Close() error { + return x.stream.Close() +} + +func (x *storeServiceList) Context() context.Context { + return x.stream.Context() +} + +func (x *storeServiceList) SendMsg(m interface{}) error { + return x.stream.Send(m) +} + +func (x *storeServiceList) RecvMsg(m interface{}) error { + return x.stream.Recv(m) +} + +func (x *storeServiceList) Recv() (*ListResponse, error) { + m := new(ListResponse) + err := x.stream.Recv(m) + if err != nil { + return nil, err + } + return m, nil +} + +func (c *storeService) Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) { + req := c.c.NewRequest(c.name, "Store.Databases", in) + out := new(DatabasesResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storeService) Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) { + req := c.c.NewRequest(c.name, "Store.Tables", in) + out := new(TablesResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Store service + +type StoreHandler interface { + Read(context.Context, *ReadRequest, *ReadResponse) error + Write(context.Context, *WriteRequest, *WriteResponse) error + Delete(context.Context, *DeleteRequest, *DeleteResponse) error + List(context.Context, *ListRequest, Store_ListStream) error + Databases(context.Context, *DatabasesRequest, *DatabasesResponse) error + Tables(context.Context, *TablesRequest, *TablesResponse) error +} + +func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error { + type store interface { + Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error + Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error + Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error + List(ctx context.Context, stream server.Stream) error + Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error + Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error + } + type Store struct { + store + } + h := &storeHandler{hdlr} + return s.Handle(s.NewHandler(&Store{h}, opts...)) +} + +type storeHandler struct { + StoreHandler +} + +func (h *storeHandler) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error { + return h.StoreHandler.Read(ctx, in, out) +} + +func (h *storeHandler) Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error { + return h.StoreHandler.Write(ctx, in, out) +} + +func (h *storeHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error { + return h.StoreHandler.Delete(ctx, in, out) +} + +func (h *storeHandler) List(ctx context.Context, stream server.Stream) error { + m := new(ListRequest) + if err := stream.Recv(m); err != nil { + return err + } + return h.StoreHandler.List(ctx, m, &storeListStream{stream}) +} + +type Store_ListStream interface { + Context() context.Context + SendMsg(interface{}) error + RecvMsg(interface{}) error + Close() error + Send(*ListResponse) error +} + +type storeListStream struct { + stream server.Stream +} + +func (x *storeListStream) Close() error { + return x.stream.Close() +} + +func (x *storeListStream) Context() context.Context { + return x.stream.Context() +} + +func (x *storeListStream) SendMsg(m interface{}) error { + return x.stream.Send(m) +} + +func (x *storeListStream) RecvMsg(m interface{}) error { + return x.stream.Recv(m) +} + +func (x *storeListStream) Send(m *ListResponse) error { + return x.stream.Send(m) +} + +func (h *storeHandler) Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error { + return h.StoreHandler.Databases(ctx, in, out) +} + +func (h *storeHandler) Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error { + return h.StoreHandler.Tables(ctx, in, out) +} diff --git a/protogen/gen/ocis/services/store/v1/store.swagger.json b/protogen/gen/ocis/services/store/v1/store.swagger.json new file mode 100644 index 00000000000..14f5a2ba498 --- /dev/null +++ b/protogen/gen/ocis/services/store/v1/store.swagger.json @@ -0,0 +1,242 @@ +{ + "swagger": "2.0", + "info": { + "title": "ownCloud Infinite Scale store", + "version": "1.0.0", + "contact": { + "name": "ownCloud GmbH", + "url": "https://github.com/owncloud/ocis", + "email": "support@owncloud.com" + }, + "license": { + "name": "Apache-2.0", + "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" + } + }, + "tags": [ + { + "name": "Store" + } + ], + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1DatabasesResponse": { + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1DeleteOptions": { + "type": "object", + "properties": { + "database": { + "type": "string" + }, + "table": { + "type": "string" + } + } + }, + "v1DeleteResponse": { + "type": "object" + }, + "v1Field": { + "type": "object", + "properties": { + "type": { + "type": "string", + "title": "type of value e.g string, int, int64, bool, float64" + }, + "value": { + "type": "string", + "title": "the actual value" + } + } + }, + "v1ListOptions": { + "type": "object", + "properties": { + "database": { + "type": "string" + }, + "table": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "suffix": { + "type": "string" + }, + "limit": { + "type": "string", + "format": "uint64" + }, + "offset": { + "type": "string", + "format": "uint64" + } + } + }, + "v1ListResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ReadOptions": { + "type": "object", + "properties": { + "database": { + "type": "string" + }, + "table": { + "type": "string" + }, + "prefix": { + "type": "boolean" + }, + "suffix": { + "type": "boolean" + }, + "limit": { + "type": "string", + "format": "uint64" + }, + "offset": { + "type": "string", + "format": "uint64" + }, + "where": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1Field" + } + } + } + }, + "v1ReadResponse": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Record" + } + } + } + }, + "v1Record": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "key of the recorda" + }, + "value": { + "type": "string", + "format": "byte", + "title": "value in the record" + }, + "expiry": { + "type": "string", + "format": "int64", + "title": "time.Duration (signed int64 nanoseconds)" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1Field" + }, + "title": "the associated metadata" + } + } + }, + "v1TablesResponse": { + "type": "object", + "properties": { + "tables": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1WriteOptions": { + "type": "object", + "properties": { + "database": { + "type": "string" + }, + "table": { + "type": "string" + }, + "expiry": { + "type": "string", + "format": "int64", + "title": "time.Time" + }, + "ttl": { + "type": "string", + "format": "int64", + "title": "time.Duration" + } + } + }, + "v1WriteResponse": { + "type": "object" + } + }, + "externalDocs": { + "description": "Developer Manual", + "url": "https://owncloud.dev/extensions/store/" + } +} diff --git a/protogen/proto/buf.gen.yaml b/protogen/proto/buf.gen.yaml index cbd866c2771..e738d48932b 100644 --- a/protogen/proto/buf.gen.yaml +++ b/protogen/proto/buf.gen.yaml @@ -20,7 +20,9 @@ plugins: - paths=source_relative - "ignore_packages=\ ocis.services.thumbnails.v1;\ - ocis.messages.thumbnails.v1" + ocis.messages.thumbnails.v1;\ + ocis.services.store.v1;\ + ocis.messages.store.v1" - name: openapiv2 path: ../../.bingo/protoc-gen-openapiv2 diff --git a/protogen/proto/ocis/messages/store/v1/store.proto b/protogen/proto/ocis/messages/store/v1/store.proto new file mode 100644 index 00000000000..c4307928904 --- /dev/null +++ b/protogen/proto/ocis/messages/store/v1/store.proto @@ -0,0 +1,56 @@ +syntax = "proto3"; + +package ocis.messages.store.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1"; + +message Field { + // type of value e.g string, int, int64, bool, float64 + string type = 1; + // the actual value + string value = 2; +} + +message Record { + // key of the recorda + string key = 1; + // value in the record + bytes value = 2; + // time.Duration (signed int64 nanoseconds) + int64 expiry = 3; + // the associated metadata + map metadata = 4; +} + +message ReadOptions { + string database = 1; + string table = 2; + bool prefix = 3; + bool suffix = 4; + uint64 limit = 5; + uint64 offset = 6; + map where = 7; +} + +message WriteOptions { + string database = 1; + string table = 2; + // time.Time + int64 expiry = 3; + // time.Duration + int64 ttl = 4; +} + +message DeleteOptions { + string database = 1; + string table = 2; +} + +message ListOptions { + string database = 1; + string table = 2; + string prefix = 3; + string suffix = 4; + uint64 limit = 5; + uint64 offset = 6; +} diff --git a/protogen/proto/ocis/services/store/v1/store.proto b/protogen/proto/ocis/services/store/v1/store.proto new file mode 100644 index 00000000000..0d8d54e7213 --- /dev/null +++ b/protogen/proto/ocis/services/store/v1/store.proto @@ -0,0 +1,87 @@ +syntax = "proto3"; + +package ocis.services.store.v1; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/service/store/v1"; + +import "ocis/messages/store/v1/store.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "ownCloud Infinite Scale store"; + version: "1.0.0"; + contact: { + name: "ownCloud GmbH"; + url: "https://github.com/owncloud/ocis"; + email: "support@owncloud.com"; + }; + license: { + name: "Apache-2.0"; + url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; + }; + }; + schemes: HTTP; + schemes: HTTPS; + consumes: "application/json"; + produces: "application/json"; + external_docs: { + description: "Developer Manual"; + url: "https://owncloud.dev/extensions/store/"; + }; +}; + +service Store { + rpc Read(ReadRequest) returns (ReadResponse) {}; + rpc Write(WriteRequest) returns (WriteResponse) {}; + rpc Delete(DeleteRequest) returns (DeleteResponse) {}; + rpc List(ListRequest) returns (stream ListResponse) {}; + rpc Databases(DatabasesRequest) returns (DatabasesResponse) {}; + rpc Tables(TablesRequest) returns (TablesResponse) {}; +} + +message ReadRequest { + string key = 1; + ocis.messages.store.v1.ReadOptions options = 2; +} + +message ReadResponse { + repeated ocis.messages.store.v1.Record records = 1; +} + +message WriteRequest { + ocis.messages.store.v1.Record record = 1; + ocis.messages.store.v1.WriteOptions options = 2; +} + +message WriteResponse {} + +message DeleteRequest { + string key = 1; + ocis.messages.store.v1.DeleteOptions options = 2; +} + +message DeleteResponse {} + +message ListRequest { + ocis.messages.store.v1.ListOptions options = 1; +} + +message ListResponse { + reserved 1; //repeated Record records = 1; + repeated string keys = 2; +} + +message DatabasesRequest {} + +message DatabasesResponse { + repeated string databases = 1; +} + +message TablesRequest { + string database = 1; +} + +message TablesResponse { + repeated string tables = 1; +} From 7bfb6c7d3ea2f90743a2a907bc4665f9e0180a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 12 Jan 2022 17:59:42 +0100 Subject: [PATCH 10/20] Migrate proto files for store and adjust paths --- ocs/pkg/service/v0/users.go | 16 +- proxy/pkg/command/server.go | 5 +- proxy/pkg/middleware/options.go | 6 +- proxy/pkg/middleware/signed_url_auth.go | 9 +- store/pkg/proto/v0/store.pb.go | 1510 ----------------------- store/pkg/proto/v0/store.pb.micro.go | 248 ---- store/pkg/proto/v0/store.swagger.json | 242 ---- store/pkg/server/grpc/server.go | 4 +- store/pkg/service/v0/service.go | 27 +- store/proto/v0/store.proto | 138 --- 10 files changed, 36 insertions(+), 2169 deletions(-) delete mode 100644 store/pkg/proto/v0/store.pb.go delete mode 100644 store/pkg/proto/v0/store.pb.micro.go delete mode 100644 store/pkg/proto/v0/store.swagger.json delete mode 100644 store/proto/v0/store.proto diff --git a/ocs/pkg/service/v0/users.go b/ocs/pkg/service/v0/users.go index 256109a41a3..cf55f10ee24 100644 --- a/ocs/pkg/service/v0/users.go +++ b/ocs/pkg/service/v0/users.go @@ -13,6 +13,9 @@ import ( accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + "github.com/asim/go-micro/plugins/client/grpc/v4" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" @@ -27,7 +30,6 @@ import ( "github.com/owncloud/ocis/ocs/pkg/service/v0/data" "github.com/owncloud/ocis/ocs/pkg/service/v0/response" ocstracing "github.com/owncloud/ocis/ocs/pkg/tracing" - storepb "github.com/owncloud/ocis/store/pkg/proto/v0" "github.com/pkg/errors" merrors "go-micro.dev/v4/errors" "google.golang.org/genproto/protobuf/field_mask" @@ -653,9 +655,9 @@ func (o Ocs) GetSigningKey(w http.ResponseWriter, r *http.Request) { // use the user's UUID userID := u.Id.OpaqueId - c := storepb.NewStoreService("com.owncloud.api.store", grpc.NewClient()) - res, err := c.Read(r.Context(), &storepb.ReadRequest{ - Options: &storepb.ReadOptions{ + c := storesvc.NewStoreService("com.owncloud.api.store", grpc.NewClient()) + res, err := c.Read(r.Context(), &storesvc.ReadRequest{ + Options: &storemsg.ReadOptions{ Database: "proxy", Table: "signing-keys", }, @@ -687,12 +689,12 @@ func (o Ocs) GetSigningKey(w http.ResponseWriter, r *http.Request) { } signingKey := hex.EncodeToString(key) - _, err = c.Write(r.Context(), &storepb.WriteRequest{ - Options: &storepb.WriteOptions{ + _, err = c.Write(r.Context(), &storesvc.WriteRequest{ + Options: &storemsg.WriteOptions{ Database: "proxy", Table: "signing-keys", }, - Record: &storepb.Record{ + Record: &storemsg.Record{ Key: userID, Value: []byte(signingKey), // TODO Expiry? diff --git a/proxy/pkg/command/server.go b/proxy/pkg/command/server.go index fae2570ba4c..787e39834b2 100644 --- a/proxy/pkg/command/server.go +++ b/proxy/pkg/command/server.go @@ -9,6 +9,8 @@ import ( accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + "github.com/coreos/go-oidc/v3/oidc" "github.com/cs3org/reva/pkg/token/manager/jwt" chimiddleware "github.com/go-chi/chi/v5/middleware" @@ -30,7 +32,6 @@ import ( proxyHTTP "github.com/owncloud/ocis/proxy/pkg/server/http" "github.com/owncloud/ocis/proxy/pkg/tracing" "github.com/owncloud/ocis/proxy/pkg/user/backend" - storepb "github.com/owncloud/ocis/store/pkg/proto/v0" "github.com/urfave/cli/v2" "golang.org/x/oauth2" ) @@ -152,7 +153,7 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config) logger.Fatal().Msgf("Invalid accounts backend type '%s'", cfg.AccountBackend) } - storeClient := storepb.NewStoreService("com.owncloud.api.store", grpc.DefaultClient) + storeClient := storesvc.NewStoreService("com.owncloud.api.store", grpc.DefaultClient) if err != nil { logger.Error().Err(err). Str("gateway", cfg.Reva.Address). diff --git a/proxy/pkg/middleware/options.go b/proxy/pkg/middleware/options.go index bf313540372..8486f5a4a7f 100644 --- a/proxy/pkg/middleware/options.go +++ b/proxy/pkg/middleware/options.go @@ -8,11 +8,11 @@ import ( accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/proxy/pkg/config" - storepb "github.com/owncloud/ocis/store/pkg/proto/v0" ) // Option defines a single option function. @@ -41,7 +41,7 @@ type Options struct { // RevaGatewayClient to send requests to the reva gateway RevaGatewayClient gateway.GatewayAPIClient // Store for persisting data - Store storepb.StoreService + Store storesvc.StoreService // PreSignedURLConfig to configure the middleware PreSignedURLConfig config.PreSignedURL // UserOIDCClaim to read from the oidc claims @@ -142,7 +142,7 @@ func RevaGatewayClient(gc gateway.GatewayAPIClient) Option { } // Store provides a function to set the store option. -func Store(sc storepb.StoreService) Option { +func Store(sc storesvc.StoreService) Option { return func(o *Options) { o.Store = sc } diff --git a/proxy/pkg/middleware/signed_url_auth.go b/proxy/pkg/middleware/signed_url_auth.go index 6eccbab15a1..5abc9df021b 100644 --- a/proxy/pkg/middleware/signed_url_auth.go +++ b/proxy/pkg/middleware/signed_url_auth.go @@ -13,9 +13,10 @@ import ( revactx "github.com/cs3org/reva/pkg/ctx" "github.com/owncloud/ocis/ocis-pkg/log" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" "github.com/owncloud/ocis/proxy/pkg/config" "github.com/owncloud/ocis/proxy/pkg/user/backend" - store "github.com/owncloud/ocis/store/pkg/proto/v0" "golang.org/x/crypto/pbkdf2" ) @@ -39,7 +40,7 @@ type signedURLAuth struct { logger log.Logger preSignedURLConfig config.PreSignedURL userProvider backend.UserBackend - store store.StoreService + store storesvc.StoreService } func (m signedURLAuth) ServeHTTP(w http.ResponseWriter, req *http.Request) { @@ -197,8 +198,8 @@ func (m signedURLAuth) createSignature(url string, signingKey []byte) string { } func (m signedURLAuth) getSigningKey(ctx context.Context, ocisID string) ([]byte, error) { - res, err := m.store.Read(ctx, &store.ReadRequest{ - Options: &store.ReadOptions{ + res, err := m.store.Read(ctx, &storesvc.ReadRequest{ + Options: &storemsg.ReadOptions{ Database: "proxy", Table: "signing-keys", }, diff --git a/store/pkg/proto/v0/store.pb.go b/store/pkg/proto/v0/store.pb.go deleted file mode 100644 index 8c971170b66..00000000000 --- a/store/pkg/proto/v0/store.pb.go +++ /dev/null @@ -1,1510 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 -// source: proto/v0/store.proto - -package proto - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - 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) -) - -type Field struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // type of value e.g string, int, int64, bool, float64 - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // the actual value - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *Field) Reset() { - *x = Field{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Field) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Field) ProtoMessage() {} - -func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 Field.ProtoReflect.Descriptor instead. -func (*Field) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{0} -} - -func (x *Field) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Field) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -type Record struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // key of the recorda - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // value in the record - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // time.Duration (signed int64 nanoseconds) - Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` - // the associated metadata - Metadata map[string]*Field `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Record) Reset() { - *x = Record{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Record) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Record) ProtoMessage() {} - -func (x *Record) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 Record.ProtoReflect.Descriptor instead. -func (*Record) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{1} -} - -func (x *Record) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Record) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *Record) GetExpiry() int64 { - if x != nil { - return x.Expiry - } - return 0 -} - -func (x *Record) GetMetadata() map[string]*Field { - if x != nil { - return x.Metadata - } - return nil -} - -type ReadOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` - Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` - Prefix bool `protobuf:"varint,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - Suffix bool `protobuf:"varint,4,opt,name=suffix,proto3" json:"suffix,omitempty"` - Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` - Offset uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"` - Where map[string]*Field `protobuf:"bytes,7,rep,name=where,proto3" json:"where,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ReadOptions) Reset() { - *x = ReadOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReadOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadOptions) ProtoMessage() {} - -func (x *ReadOptions) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ReadOptions.ProtoReflect.Descriptor instead. -func (*ReadOptions) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{2} -} - -func (x *ReadOptions) GetDatabase() string { - if x != nil { - return x.Database - } - return "" -} - -func (x *ReadOptions) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -func (x *ReadOptions) GetPrefix() bool { - if x != nil { - return x.Prefix - } - return false -} - -func (x *ReadOptions) GetSuffix() bool { - if x != nil { - return x.Suffix - } - return false -} - -func (x *ReadOptions) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *ReadOptions) GetOffset() uint64 { - if x != nil { - return x.Offset - } - return 0 -} - -func (x *ReadOptions) GetWhere() map[string]*Field { - if x != nil { - return x.Where - } - return nil -} - -type ReadRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Options *ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *ReadRequest) Reset() { - *x = ReadRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReadRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadRequest) ProtoMessage() {} - -func (x *ReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ReadRequest.ProtoReflect.Descriptor instead. -func (*ReadRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{3} -} - -func (x *ReadRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ReadRequest) GetOptions() *ReadOptions { - if x != nil { - return x.Options - } - return nil -} - -type ReadResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` -} - -func (x *ReadResponse) Reset() { - *x = ReadResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReadResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReadResponse) ProtoMessage() {} - -func (x *ReadResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ReadResponse.ProtoReflect.Descriptor instead. -func (*ReadResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{4} -} - -func (x *ReadResponse) GetRecords() []*Record { - if x != nil { - return x.Records - } - return nil -} - -type WriteOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` - Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` - // time.Time - Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` - // time.Duration - Ttl int64 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"` -} - -func (x *WriteOptions) Reset() { - *x = WriteOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WriteOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WriteOptions) ProtoMessage() {} - -func (x *WriteOptions) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 WriteOptions.ProtoReflect.Descriptor instead. -func (*WriteOptions) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{5} -} - -func (x *WriteOptions) GetDatabase() string { - if x != nil { - return x.Database - } - return "" -} - -func (x *WriteOptions) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -func (x *WriteOptions) GetExpiry() int64 { - if x != nil { - return x.Expiry - } - return 0 -} - -func (x *WriteOptions) GetTtl() int64 { - if x != nil { - return x.Ttl - } - return 0 -} - -type WriteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - Options *WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *WriteRequest) Reset() { - *x = WriteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WriteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WriteRequest) ProtoMessage() {} - -func (x *WriteRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 WriteRequest.ProtoReflect.Descriptor instead. -func (*WriteRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{6} -} - -func (x *WriteRequest) GetRecord() *Record { - if x != nil { - return x.Record - } - return nil -} - -func (x *WriteRequest) GetOptions() *WriteOptions { - if x != nil { - return x.Options - } - return nil -} - -type WriteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *WriteResponse) Reset() { - *x = WriteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WriteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WriteResponse) ProtoMessage() {} - -func (x *WriteResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 WriteResponse.ProtoReflect.Descriptor instead. -func (*WriteResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{7} -} - -type DeleteOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` - Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` -} - -func (x *DeleteOptions) Reset() { - *x = DeleteOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteOptions) ProtoMessage() {} - -func (x *DeleteOptions) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 DeleteOptions.ProtoReflect.Descriptor instead. -func (*DeleteOptions) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{8} -} - -func (x *DeleteOptions) GetDatabase() string { - if x != nil { - return x.Database - } - return "" -} - -func (x *DeleteOptions) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Options *DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *DeleteRequest) Reset() { - *x = DeleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRequest) ProtoMessage() {} - -func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 DeleteRequest.ProtoReflect.Descriptor instead. -func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteRequest) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *DeleteRequest) GetOptions() *DeleteOptions { - if x != nil { - return x.Options - } - return nil -} - -type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResponse) Reset() { - *x = DeleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResponse) ProtoMessage() {} - -func (x *DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 DeleteResponse.ProtoReflect.Descriptor instead. -func (*DeleteResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{10} -} - -type ListOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` - Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` - Prefix string `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` - Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` - Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` - Offset uint64 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"` -} - -func (x *ListOptions) Reset() { - *x = ListOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListOptions) ProtoMessage() {} - -func (x *ListOptions) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ListOptions.ProtoReflect.Descriptor instead. -func (*ListOptions) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{11} -} - -func (x *ListOptions) GetDatabase() string { - if x != nil { - return x.Database - } - return "" -} - -func (x *ListOptions) GetTable() string { - if x != nil { - return x.Table - } - return "" -} - -func (x *ListOptions) GetPrefix() string { - if x != nil { - return x.Prefix - } - return "" -} - -func (x *ListOptions) GetSuffix() string { - if x != nil { - return x.Suffix - } - return "" -} - -func (x *ListOptions) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *ListOptions) GetOffset() uint64 { - if x != nil { - return x.Offset - } - return 0 -} - -type ListRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Options *ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` -} - -func (x *ListRequest) Reset() { - *x = ListRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRequest) ProtoMessage() {} - -func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ListRequest.ProtoReflect.Descriptor instead. -func (*ListRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{12} -} - -func (x *ListRequest) GetOptions() *ListOptions { - if x != nil { - return x.Options - } - return nil -} - -type ListResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *ListResponse) Reset() { - *x = ListResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResponse) ProtoMessage() {} - -func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_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 ListResponse.ProtoReflect.Descriptor instead. -func (*ListResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{13} -} - -func (x *ListResponse) GetKeys() []string { - if x != nil { - return x.Keys - } - return nil -} - -type DatabasesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DatabasesRequest) Reset() { - *x = DatabasesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DatabasesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatabasesRequest) ProtoMessage() {} - -func (x *DatabasesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_proto_msgTypes[14] - 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 DatabasesRequest.ProtoReflect.Descriptor instead. -func (*DatabasesRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{14} -} - -type DatabasesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Databases []string `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` -} - -func (x *DatabasesResponse) Reset() { - *x = DatabasesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DatabasesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DatabasesResponse) ProtoMessage() {} - -func (x *DatabasesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_proto_msgTypes[15] - 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 DatabasesResponse.ProtoReflect.Descriptor instead. -func (*DatabasesResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{15} -} - -func (x *DatabasesResponse) GetDatabases() []string { - if x != nil { - return x.Databases - } - return nil -} - -type TablesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` -} - -func (x *TablesRequest) Reset() { - *x = TablesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TablesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TablesRequest) ProtoMessage() {} - -func (x *TablesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_proto_msgTypes[16] - 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 TablesRequest.ProtoReflect.Descriptor instead. -func (*TablesRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{16} -} - -func (x *TablesRequest) GetDatabase() string { - if x != nil { - return x.Database - } - return "" -} - -type TablesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Tables []string `protobuf:"bytes,1,rep,name=tables,proto3" json:"tables,omitempty"` -} - -func (x *TablesResponse) Reset() { - *x = TablesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_store_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TablesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TablesResponse) ProtoMessage() {} - -func (x *TablesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_store_proto_msgTypes[17] - 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 TablesResponse.ProtoReflect.Descriptor instead. -func (*TablesResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_store_proto_rawDescGZIP(), []int{17} -} - -func (x *TablesResponse) GetTables() []string { - if x != nil { - return x.Tables - } - return nil -} - -var File_proto_v0_store_proto protoreflect.FileDescriptor - -var file_proto_v0_store_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x30, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, 0x22, 0x31, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, - 0x12, 0x4c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x5e, - 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc4, - 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, - 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x48, - 0x0a, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x57, 0x68, 0x65, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x1a, 0x5b, 0x0a, 0x0a, 0x57, 0x68, 0x65, 0x72, - 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x62, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, 0x0a, 0x0c, 0x52, 0x65, 0x61, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x6a, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x74, 0x74, 0x6c, 0x22, 0x8e, 0x01, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x12, 0x42, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x66, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, - 0x66, 0x66, 0x69, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x22, 0x50, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x41, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x12, - 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x31, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x32, 0xd5, 0x04, 0x0a, - 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x5b, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x27, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x28, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6a, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x61, 0x0a, 0x06, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x30, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0xd1, 0x02, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, - 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x76, 0x30, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x41, 0x9a, 0x02, 0x12, 0xb3, - 0x01, 0x0a, 0x1d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, - 0x48, 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, - 0x63, 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, - 0x63, 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, - 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, - 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x0a, 0x10, - 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, - 0x12, 0x26, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_v0_store_proto_rawDescOnce sync.Once - file_proto_v0_store_proto_rawDescData = file_proto_v0_store_proto_rawDesc -) - -func file_proto_v0_store_proto_rawDescGZIP() []byte { - file_proto_v0_store_proto_rawDescOnce.Do(func() { - file_proto_v0_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_v0_store_proto_rawDescData) - }) - return file_proto_v0_store_proto_rawDescData -} - -var file_proto_v0_store_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_proto_v0_store_proto_goTypes = []interface{}{ - (*Field)(nil), // 0: com.owncloud.ocis.store.v0.Field - (*Record)(nil), // 1: com.owncloud.ocis.store.v0.Record - (*ReadOptions)(nil), // 2: com.owncloud.ocis.store.v0.ReadOptions - (*ReadRequest)(nil), // 3: com.owncloud.ocis.store.v0.ReadRequest - (*ReadResponse)(nil), // 4: com.owncloud.ocis.store.v0.ReadResponse - (*WriteOptions)(nil), // 5: com.owncloud.ocis.store.v0.WriteOptions - (*WriteRequest)(nil), // 6: com.owncloud.ocis.store.v0.WriteRequest - (*WriteResponse)(nil), // 7: com.owncloud.ocis.store.v0.WriteResponse - (*DeleteOptions)(nil), // 8: com.owncloud.ocis.store.v0.DeleteOptions - (*DeleteRequest)(nil), // 9: com.owncloud.ocis.store.v0.DeleteRequest - (*DeleteResponse)(nil), // 10: com.owncloud.ocis.store.v0.DeleteResponse - (*ListOptions)(nil), // 11: com.owncloud.ocis.store.v0.ListOptions - (*ListRequest)(nil), // 12: com.owncloud.ocis.store.v0.ListRequest - (*ListResponse)(nil), // 13: com.owncloud.ocis.store.v0.ListResponse - (*DatabasesRequest)(nil), // 14: com.owncloud.ocis.store.v0.DatabasesRequest - (*DatabasesResponse)(nil), // 15: com.owncloud.ocis.store.v0.DatabasesResponse - (*TablesRequest)(nil), // 16: com.owncloud.ocis.store.v0.TablesRequest - (*TablesResponse)(nil), // 17: com.owncloud.ocis.store.v0.TablesResponse - nil, // 18: com.owncloud.ocis.store.v0.Record.MetadataEntry - nil, // 19: com.owncloud.ocis.store.v0.ReadOptions.WhereEntry -} -var file_proto_v0_store_proto_depIdxs = []int32{ - 18, // 0: com.owncloud.ocis.store.v0.Record.metadata:type_name -> com.owncloud.ocis.store.v0.Record.MetadataEntry - 19, // 1: com.owncloud.ocis.store.v0.ReadOptions.where:type_name -> com.owncloud.ocis.store.v0.ReadOptions.WhereEntry - 2, // 2: com.owncloud.ocis.store.v0.ReadRequest.options:type_name -> com.owncloud.ocis.store.v0.ReadOptions - 1, // 3: com.owncloud.ocis.store.v0.ReadResponse.records:type_name -> com.owncloud.ocis.store.v0.Record - 1, // 4: com.owncloud.ocis.store.v0.WriteRequest.record:type_name -> com.owncloud.ocis.store.v0.Record - 5, // 5: com.owncloud.ocis.store.v0.WriteRequest.options:type_name -> com.owncloud.ocis.store.v0.WriteOptions - 8, // 6: com.owncloud.ocis.store.v0.DeleteRequest.options:type_name -> com.owncloud.ocis.store.v0.DeleteOptions - 11, // 7: com.owncloud.ocis.store.v0.ListRequest.options:type_name -> com.owncloud.ocis.store.v0.ListOptions - 0, // 8: com.owncloud.ocis.store.v0.Record.MetadataEntry.value:type_name -> com.owncloud.ocis.store.v0.Field - 0, // 9: com.owncloud.ocis.store.v0.ReadOptions.WhereEntry.value:type_name -> com.owncloud.ocis.store.v0.Field - 3, // 10: com.owncloud.ocis.store.v0.Store.Read:input_type -> com.owncloud.ocis.store.v0.ReadRequest - 6, // 11: com.owncloud.ocis.store.v0.Store.Write:input_type -> com.owncloud.ocis.store.v0.WriteRequest - 9, // 12: com.owncloud.ocis.store.v0.Store.Delete:input_type -> com.owncloud.ocis.store.v0.DeleteRequest - 12, // 13: com.owncloud.ocis.store.v0.Store.List:input_type -> com.owncloud.ocis.store.v0.ListRequest - 14, // 14: com.owncloud.ocis.store.v0.Store.Databases:input_type -> com.owncloud.ocis.store.v0.DatabasesRequest - 16, // 15: com.owncloud.ocis.store.v0.Store.Tables:input_type -> com.owncloud.ocis.store.v0.TablesRequest - 4, // 16: com.owncloud.ocis.store.v0.Store.Read:output_type -> com.owncloud.ocis.store.v0.ReadResponse - 7, // 17: com.owncloud.ocis.store.v0.Store.Write:output_type -> com.owncloud.ocis.store.v0.WriteResponse - 10, // 18: com.owncloud.ocis.store.v0.Store.Delete:output_type -> com.owncloud.ocis.store.v0.DeleteResponse - 13, // 19: com.owncloud.ocis.store.v0.Store.List:output_type -> com.owncloud.ocis.store.v0.ListResponse - 15, // 20: com.owncloud.ocis.store.v0.Store.Databases:output_type -> com.owncloud.ocis.store.v0.DatabasesResponse - 17, // 21: com.owncloud.ocis.store.v0.Store.Tables:output_type -> com.owncloud.ocis.store.v0.TablesResponse - 16, // [16:22] is the sub-list for method output_type - 10, // [10:16] 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_proto_v0_store_proto_init() } -func file_proto_v0_store_proto_init() { - if File_proto_v0_store_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_v0_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Field); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Record); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReadResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WriteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatabasesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatabasesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TablesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_store_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TablesResponse); 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_proto_v0_store_proto_rawDesc, - NumEnums: 0, - NumMessages: 20, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_v0_store_proto_goTypes, - DependencyIndexes: file_proto_v0_store_proto_depIdxs, - MessageInfos: file_proto_v0_store_proto_msgTypes, - }.Build() - File_proto_v0_store_proto = out.File - file_proto_v0_store_proto_rawDesc = nil - file_proto_v0_store_proto_goTypes = nil - file_proto_v0_store_proto_depIdxs = nil -} diff --git a/store/pkg/proto/v0/store.pb.micro.go b/store/pkg/proto/v0/store.pb.micro.go deleted file mode 100644 index 6d252879dde..00000000000 --- a/store/pkg/proto/v0/store.pb.micro.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/v0/store.proto - -package proto - -import ( - fmt "fmt" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - proto "google.golang.org/protobuf/proto" - math "math" -) - -import ( - context "context" - api "go-micro.dev/v4/api" - client "go-micro.dev/v4/client" - server "go-micro.dev/v4/server" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for Store service - -func NewStoreEndpoints() []*api.Endpoint { - return []*api.Endpoint{} -} - -// Client API for Store service - -type StoreService interface { - Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) - Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) - Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) - List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error) - Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) - Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) -} - -type storeService struct { - c client.Client - name string -} - -func NewStoreService(name string, c client.Client) StoreService { - return &storeService{ - c: c, - name: name, - } -} - -func (c *storeService) Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) { - req := c.c.NewRequest(c.name, "Store.Read", in) - out := new(ReadResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storeService) Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) { - req := c.c.NewRequest(c.name, "Store.Write", in) - out := new(WriteResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storeService) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) { - req := c.c.NewRequest(c.name, "Store.Delete", in) - out := new(DeleteResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storeService) List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (Store_ListService, error) { - req := c.c.NewRequest(c.name, "Store.List", &ListRequest{}) - stream, err := c.c.Stream(ctx, req, opts...) - if err != nil { - return nil, err - } - if err := stream.Send(in); err != nil { - return nil, err - } - return &storeServiceList{stream}, nil -} - -type Store_ListService interface { - Context() context.Context - SendMsg(interface{}) error - RecvMsg(interface{}) error - Close() error - Recv() (*ListResponse, error) -} - -type storeServiceList struct { - stream client.Stream -} - -func (x *storeServiceList) Close() error { - return x.stream.Close() -} - -func (x *storeServiceList) Context() context.Context { - return x.stream.Context() -} - -func (x *storeServiceList) SendMsg(m interface{}) error { - return x.stream.Send(m) -} - -func (x *storeServiceList) RecvMsg(m interface{}) error { - return x.stream.Recv(m) -} - -func (x *storeServiceList) Recv() (*ListResponse, error) { - m := new(ListResponse) - err := x.stream.Recv(m) - if err != nil { - return nil, err - } - return m, nil -} - -func (c *storeService) Databases(ctx context.Context, in *DatabasesRequest, opts ...client.CallOption) (*DatabasesResponse, error) { - req := c.c.NewRequest(c.name, "Store.Databases", in) - out := new(DatabasesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *storeService) Tables(ctx context.Context, in *TablesRequest, opts ...client.CallOption) (*TablesResponse, error) { - req := c.c.NewRequest(c.name, "Store.Tables", in) - out := new(TablesResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Store service - -type StoreHandler interface { - Read(context.Context, *ReadRequest, *ReadResponse) error - Write(context.Context, *WriteRequest, *WriteResponse) error - Delete(context.Context, *DeleteRequest, *DeleteResponse) error - List(context.Context, *ListRequest, Store_ListStream) error - Databases(context.Context, *DatabasesRequest, *DatabasesResponse) error - Tables(context.Context, *TablesRequest, *TablesResponse) error -} - -func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error { - type store interface { - Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error - Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error - Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error - List(ctx context.Context, stream server.Stream) error - Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error - Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error - } - type Store struct { - store - } - h := &storeHandler{hdlr} - return s.Handle(s.NewHandler(&Store{h}, opts...)) -} - -type storeHandler struct { - StoreHandler -} - -func (h *storeHandler) Read(ctx context.Context, in *ReadRequest, out *ReadResponse) error { - return h.StoreHandler.Read(ctx, in, out) -} - -func (h *storeHandler) Write(ctx context.Context, in *WriteRequest, out *WriteResponse) error { - return h.StoreHandler.Write(ctx, in, out) -} - -func (h *storeHandler) Delete(ctx context.Context, in *DeleteRequest, out *DeleteResponse) error { - return h.StoreHandler.Delete(ctx, in, out) -} - -func (h *storeHandler) List(ctx context.Context, stream server.Stream) error { - m := new(ListRequest) - if err := stream.Recv(m); err != nil { - return err - } - return h.StoreHandler.List(ctx, m, &storeListStream{stream}) -} - -type Store_ListStream interface { - Context() context.Context - SendMsg(interface{}) error - RecvMsg(interface{}) error - Close() error - Send(*ListResponse) error -} - -type storeListStream struct { - stream server.Stream -} - -func (x *storeListStream) Close() error { - return x.stream.Close() -} - -func (x *storeListStream) Context() context.Context { - return x.stream.Context() -} - -func (x *storeListStream) SendMsg(m interface{}) error { - return x.stream.Send(m) -} - -func (x *storeListStream) RecvMsg(m interface{}) error { - return x.stream.Recv(m) -} - -func (x *storeListStream) Send(m *ListResponse) error { - return x.stream.Send(m) -} - -func (h *storeHandler) Databases(ctx context.Context, in *DatabasesRequest, out *DatabasesResponse) error { - return h.StoreHandler.Databases(ctx, in, out) -} - -func (h *storeHandler) Tables(ctx context.Context, in *TablesRequest, out *TablesResponse) error { - return h.StoreHandler.Tables(ctx, in, out) -} diff --git a/store/pkg/proto/v0/store.swagger.json b/store/pkg/proto/v0/store.swagger.json deleted file mode 100644 index 2beaed54c48..00000000000 --- a/store/pkg/proto/v0/store.swagger.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ownCloud Infinite Scale store", - "version": "1.0.0", - "contact": { - "name": "ownCloud GmbH", - "url": "https://github.com/owncloud/ocis", - "email": "support@owncloud.com" - }, - "license": { - "name": "Apache-2.0", - "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "Store" - } - ], - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": {}, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v0DatabasesResponse": { - "type": "object", - "properties": { - "databases": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v0DeleteOptions": { - "type": "object", - "properties": { - "database": { - "type": "string" - }, - "table": { - "type": "string" - } - } - }, - "v0DeleteResponse": { - "type": "object" - }, - "v0Field": { - "type": "object", - "properties": { - "type": { - "type": "string", - "title": "type of value e.g string, int, int64, bool, float64" - }, - "value": { - "type": "string", - "title": "the actual value" - } - } - }, - "v0ListOptions": { - "type": "object", - "properties": { - "database": { - "type": "string" - }, - "table": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "suffix": { - "type": "string" - }, - "limit": { - "type": "string", - "format": "uint64" - }, - "offset": { - "type": "string", - "format": "uint64" - } - } - }, - "v0ListResponse": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v0ReadOptions": { - "type": "object", - "properties": { - "database": { - "type": "string" - }, - "table": { - "type": "string" - }, - "prefix": { - "type": "boolean" - }, - "suffix": { - "type": "boolean" - }, - "limit": { - "type": "string", - "format": "uint64" - }, - "offset": { - "type": "string", - "format": "uint64" - }, - "where": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v0Field" - } - } - } - }, - "v0ReadResponse": { - "type": "object", - "properties": { - "records": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Record" - } - } - } - }, - "v0Record": { - "type": "object", - "properties": { - "key": { - "type": "string", - "title": "key of the recorda" - }, - "value": { - "type": "string", - "format": "byte", - "title": "value in the record" - }, - "expiry": { - "type": "string", - "format": "int64", - "title": "time.Duration (signed int64 nanoseconds)" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/v0Field" - }, - "title": "the associated metadata" - } - } - }, - "v0TablesResponse": { - "type": "object", - "properties": { - "tables": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v0WriteOptions": { - "type": "object", - "properties": { - "database": { - "type": "string" - }, - "table": { - "type": "string" - }, - "expiry": { - "type": "string", - "format": "int64", - "title": "time.Time" - }, - "ttl": { - "type": "string", - "format": "int64", - "title": "time.Duration" - } - } - }, - "v0WriteResponse": { - "type": "object" - } - }, - "externalDocs": { - "description": "Developer Manual", - "url": "https://owncloud.dev/extensions/store/" - } -} diff --git a/store/pkg/server/grpc/server.go b/store/pkg/server/grpc/server.go index 632505486f7..2e3cdcdb2be 100644 --- a/store/pkg/server/grpc/server.go +++ b/store/pkg/server/grpc/server.go @@ -3,7 +3,7 @@ package grpc import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - "github.com/owncloud/ocis/store/pkg/proto/v0" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" svc "github.com/owncloud/ocis/store/pkg/service/v0" ) @@ -28,7 +28,7 @@ func Server(opts ...Option) grpc.Service { if err != nil { options.Logger.Fatal().Err(err).Msg("could not initialize service handler") } - if err = proto.RegisterStoreHandler(service.Server(), hdlr); err != nil { + if err = storesvc.RegisterStoreHandler(service.Server(), hdlr); err != nil { options.Logger.Fatal().Err(err).Msg("could not register service handler") } diff --git a/store/pkg/service/v0/service.go b/store/pkg/service/v0/service.go index b86033f1d3f..bed2728da70 100644 --- a/store/pkg/service/v0/service.go +++ b/store/pkg/service/v0/service.go @@ -10,17 +10,18 @@ import ( "github.com/blevesearch/bleve/v2" "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword" "github.com/owncloud/ocis/ocis-pkg/log" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" "github.com/owncloud/ocis/store/pkg/config" - "github.com/owncloud/ocis/store/pkg/proto/v0" merrors "go-micro.dev/v4/errors" "google.golang.org/protobuf/encoding/protojson" ) // BleveDocument wraps the generated Record.Metadata and adds a property that is used to distinguish documents in the index. type BleveDocument struct { - Metadata map[string]*proto.Field `json:"metadata"` - Database string `json:"database"` - Table string `json:"table"` + Metadata map[string]*storemsg.Field `json:"metadata"` + Database string `json:"database"` + Table string `json:"table"` } // New returns a new instance of Service @@ -77,13 +78,13 @@ type Service struct { } // Read implements the StoreHandler interface. -func (s *Service) Read(c context.Context, rreq *proto.ReadRequest, rres *proto.ReadResponse) error { +func (s *Service) Read(c context.Context, rreq *storesvc.ReadRequest, rres *storesvc.ReadResponse) error { if len(rreq.Key) != 0 { id := getID(rreq.Options.Database, rreq.Options.Table, rreq.Key) file := filepath.Join(s.Config.Datapath, "databases", id) var data []byte - rec := &proto.Record{} + rec := &storemsg.Record{} data, err := ioutil.ReadFile(file) if err != nil { return merrors.NotFound(s.id, "could not read record") @@ -123,7 +124,7 @@ func (s *Service) Read(c context.Context, rreq *proto.ReadRequest, rres *proto.R } for _, hit := range searchResult.Hits { - rec := &proto.Record{} + rec := &storemsg.Record{} dest := filepath.Join(s.Config.Datapath, "databases", hit.ID) @@ -148,7 +149,7 @@ func (s *Service) Read(c context.Context, rreq *proto.ReadRequest, rres *proto.R } // Write implements the StoreHandler interface. -func (s *Service) Write(c context.Context, wreq *proto.WriteRequest, wres *proto.WriteResponse) error { +func (s *Service) Write(c context.Context, wreq *storesvc.WriteRequest, wres *storesvc.WriteResponse) error { id := getID(wreq.Options.Database, wreq.Options.Table, wreq.Record.Key) file := filepath.Join(s.Config.Datapath, "databases", id) @@ -181,7 +182,7 @@ func (s *Service) Write(c context.Context, wreq *proto.WriteRequest, wres *proto } // Delete implements the StoreHandler interface. -func (s *Service) Delete(c context.Context, dreq *proto.DeleteRequest, dres *proto.DeleteResponse) error { +func (s *Service) Delete(c context.Context, dreq *storesvc.DeleteRequest, dres *storesvc.DeleteResponse) error { id := getID(dreq.Options.Database, dreq.Options.Table, dreq.Key) file := filepath.Join(s.Config.Datapath, "databases", id) if err := os.Remove(file); err != nil { @@ -201,12 +202,12 @@ func (s *Service) Delete(c context.Context, dreq *proto.DeleteRequest, dres *pro } // List implements the StoreHandler interface. -func (s *Service) List(context.Context, *proto.ListRequest, proto.Store_ListStream) error { +func (s *Service) List(context.Context, *storesvc.ListRequest, storesvc.Store_ListStream) error { return nil } // Databases implements the StoreHandler interface. -func (s *Service) Databases(c context.Context, dbreq *proto.DatabasesRequest, dbres *proto.DatabasesResponse) error { +func (s *Service) Databases(c context.Context, dbreq *storesvc.DatabasesRequest, dbres *storesvc.DatabasesResponse) error { file := filepath.Join(s.Config.Datapath, "databases") f, err := os.Open(file) if err != nil { @@ -224,7 +225,7 @@ func (s *Service) Databases(c context.Context, dbreq *proto.DatabasesRequest, db } // Tables implements the StoreHandler interface. -func (s *Service) Tables(ctx context.Context, in *proto.TablesRequest, out *proto.TablesResponse) error { +func (s *Service) Tables(ctx context.Context, in *storesvc.TablesRequest, out *storesvc.TablesResponse) error { file := filepath.Join(s.Config.Datapath, "databases", in.Database) f, err := os.Open(file) if err != nil { @@ -300,7 +301,7 @@ func (s Service) indexRecords(recordsDir string) (err error) { // read record var data []byte - rec := &proto.Record{} + rec := &storemsg.Record{} data, err = ioutil.ReadFile(kp) if err != nil { s.log.Error().Err(err).Str("id", id).Msg("could not read record") diff --git a/store/proto/v0/store.proto b/store/proto/v0/store.proto deleted file mode 100644 index 32dbfb304db..00000000000 --- a/store/proto/v0/store.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; - -package com.owncloud.ocis.store.v0; - -option go_package = "github.com/owncloud/ocis/store/pkg/proto/v0;proto"; - -import "protoc-gen-openapiv2/options/annotations.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "ownCloud Infinite Scale store"; - version: "1.0.0"; - contact: { - name: "ownCloud GmbH"; - url: "https://github.com/owncloud/ocis"; - email: "support@owncloud.com"; - }; - license: { - name: "Apache-2.0"; - url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; - }; - }; - schemes: HTTP; - schemes: HTTPS; - consumes: "application/json"; - produces: "application/json"; - external_docs: { - description: "Developer Manual"; - url: "https://owncloud.dev/extensions/store/"; - }; -}; - -service Store { - rpc Read(ReadRequest) returns (ReadResponse) {}; - rpc Write(WriteRequest) returns (WriteResponse) {}; - rpc Delete(DeleteRequest) returns (DeleteResponse) {}; - rpc List(ListRequest) returns (stream ListResponse) {}; - rpc Databases(DatabasesRequest) returns (DatabasesResponse) {}; - rpc Tables(TablesRequest) returns (TablesResponse) {}; -} - -message Field { - // type of value e.g string, int, int64, bool, float64 - string type = 1; - // the actual value - string value = 2; -} - -message Record { - // key of the recorda - string key = 1; - // value in the record - bytes value = 2; - // time.Duration (signed int64 nanoseconds) - int64 expiry = 3; - // the associated metadata - map metadata = 4; -} - -message ReadOptions { - string database = 1; - string table = 2; - bool prefix = 3; - bool suffix = 4; - uint64 limit = 5; - uint64 offset = 6; - map where = 7; -} - -message ReadRequest { - string key = 1; - ReadOptions options = 2; -} - -message ReadResponse { - repeated Record records = 1; -} - -message WriteOptions { - string database = 1; - string table = 2; - // time.Time - int64 expiry = 3; - // time.Duration - int64 ttl = 4; -} - -message WriteRequest { - Record record = 1; - WriteOptions options = 2; -} - -message WriteResponse {} - -message DeleteOptions { - string database = 1; - string table = 2; -} - -message DeleteRequest { - string key = 1; - DeleteOptions options = 2; -} - -message DeleteResponse {} - -message ListOptions { - string database = 1; - string table = 2; - string prefix = 3; - string suffix = 4; - uint64 limit = 5; - uint64 offset = 6; -} - - -message ListRequest { - ListOptions options = 1; -} - -message ListResponse { - reserved 1; //repeated Record records = 1; - repeated string keys = 2; -} - -message DatabasesRequest {} - -message DatabasesResponse { - repeated string databases = 1; -} - -message TablesRequest { - string database = 1; -} - -message TablesResponse { - repeated string tables = 1; -} From b62c9044af90ffddcb8d758d126e59bfe60c73ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 13 Jan 2022 09:33:49 +0100 Subject: [PATCH 11/20] Restore mock files and adjust failing tests --- .../indexer/index/disk/autoincrement_test.go | 4 +- ocs/pkg/server/http/svc_test.go | 39 ++-- .../services/accounts/v1/accounts.mock.go | 90 +++++++++ .../services/settings/v1/settings.mock.go | 186 ++++++++++++++++++ proxy/pkg/proxy/policy/selector_test.go | 15 +- proxy/pkg/user/backend/accounts_test.go | 33 ++-- 6 files changed, 323 insertions(+), 44 deletions(-) create mode 100644 protogen/gen/ocis/services/accounts/v1/accounts.mock.go create mode 100644 protogen/gen/ocis/services/settings/v1/settings.mock.go diff --git a/ocis-pkg/indexer/index/disk/autoincrement_test.go b/ocis-pkg/indexer/index/disk/autoincrement_test.go index 998ad2af657..5a2f55d5df6 100644 --- a/ocis-pkg/indexer/index/disk/autoincrement_test.go +++ b/ocis-pkg/indexer/index/disk/autoincrement_test.go @@ -8,7 +8,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/indexer/option" //. "github.com/owncloud/ocis/ocis-pkg/indexer/test" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" "github.com/stretchr/testify/assert" ) @@ -236,7 +236,7 @@ func TestAdd(t *testing.T) { }), option.WithDataDir(tmpDir), option.WithFilesDir(filepath.Join(tmpDir, "data")), - option.WithEntity(&proto.Account{}), + option.WithEntity(&accountsmsg.Account{}), option.WithTypeName("owncloud.Account"), option.WithIndexBy("UidNumber"), ) diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index ae6a2d5db3e..a345e558687 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -22,13 +22,14 @@ import ( "github.com/golang/protobuf/ptypes/empty" accountsCfg "github.com/owncloud/ocis/accounts/pkg/config" accountsLogging "github.com/owncloud/ocis/accounts/pkg/logging" - accountsProto "github.com/owncloud/ocis/accounts/pkg/proto/v0" - accountsSvc "github.com/owncloud/ocis/accounts/pkg/service/v0" + accountsServiceExt "github.com/owncloud/ocis/accounts/pkg/service/v0" ocisLog "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocs/pkg/config" svc "github.com/owncloud/ocis/ocs/pkg/service/v0" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/stretchr/testify/assert" @@ -481,10 +482,10 @@ func assertUsersSame(t *testing.T, expected, actual User, quotaAvailable bool) { } } -func findAccount(t *testing.T, username string) (*accountsProto.Account, error) { - cl := accountsProto.NewAccountsService("com.owncloud.api.accounts", service.Client()) +func findAccount(t *testing.T, username string) (*accountsmsg.Account, error) { + cl := accountssvc.NewAccountsService("com.owncloud.api.accounts", service.Client()) - req := &accountsProto.ListAccountsRequest{ + req := &accountssvc.ListAccountsRequest{ Query: "preferred_name eq '" + username + "'", } res, err := cl.ListAccounts(context.Background(), req) @@ -498,17 +499,17 @@ func findAccount(t *testing.T, username string) (*accountsProto.Account, error) } func deleteAccount(t *testing.T, id string) (*empty.Empty, error) { - cl := accountsProto.NewAccountsService("com.owncloud.api.accounts", service.Client()) + cl := accountssvc.NewAccountsService("com.owncloud.api.accounts", service.Client()) - req := &accountsProto.DeleteAccountRequest{Id: id} + req := &accountssvc.DeleteAccountRequest{Id: id} res, err := cl.DeleteAccount(context.Background(), req) return res, err } func deleteGroup(t *testing.T, id string) (*empty.Empty, error) { - cl := accountsProto.NewGroupsService("com.owncloud.api.accounts", service.Client()) + cl := accountssvc.NewGroupsService("com.owncloud.api.accounts", service.Client()) - req := &accountsProto.DeleteGroupRequest{Id: id} + req := &accountssvc.DeleteGroupRequest{Id: id} res, err := cl.DeleteGroup(context.Background(), req) return res, err } @@ -518,7 +519,7 @@ func buildRoleServiceMock() settingssvc.RoleService { AssignRoleToUserFunc: func(ctx context.Context, req *settingssvc.AssignRoleToUserRequest, opts ...client.CallOption) (res *settingssvc.AssignRoleToUserResponse, err error) { mockedRoleAssignment[req.AccountUuid] = req.RoleId return &settingssvc.AssignRoleToUserResponse{ - Assignment: &settingssvc.UserRoleAssignment{ + Assignment: &settingsmsg.UserRoleAssignment{ AccountUuid: req.AccountUuid, RoleId: req.RoleId, }, @@ -531,7 +532,7 @@ func buildRoleServiceMock() settingssvc.RoleService { Id: ssvc.BundleUUIDRoleAdmin, Settings: []*settingsmsg.Setting{ { - Id: accountsSvc.AccountManagementPermissionID, + Id: accountsServiceExt.AccountManagementPermissionID, }, }, }, @@ -539,7 +540,7 @@ func buildRoleServiceMock() settingssvc.RoleService { Id: ssvc.BundleUUIDRoleUser, Settings: []*settingsmsg.Setting{ { - Id: accountsSvc.SelfManagementPermissionID, + Id: accountsServiceExt.SelfManagementPermissionID, }, }, }, @@ -571,22 +572,22 @@ func init() { }, } - var hdlr *accountsSvc.Service + var hdlr *accountsServiceExt.Service var err error - if hdlr, err = accountsSvc.New( - accountsSvc.Logger(accountsLogging.Configure("accounts", c.Log)), - accountsSvc.Config(c), - accountsSvc.RoleService(buildRoleServiceMock()), + if hdlr, err = accountsServiceExt.New( + accountsServiceExt.Logger(accountsLogging.Configure("accounts", c.Log)), + accountsServiceExt.Config(c), + accountsServiceExt.RoleService(buildRoleServiceMock()), ); err != nil { log.Fatalf("Could not create new service") } - err = accountsProto.RegisterAccountsServiceHandler(service.Server(), hdlr) + err = accountssvc.RegisterAccountsServiceHandler(service.Server(), hdlr) if err != nil { log.Fatal("could not register the Accounts handler") } - err = accountsProto.RegisterGroupsServiceHandler(service.Server(), hdlr) + err = accountssvc.RegisterGroupsServiceHandler(service.Server(), hdlr) if err != nil { log.Fatal("could not register the Groups handler") } diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.mock.go b/protogen/gen/ocis/services/accounts/v1/accounts.mock.go new file mode 100644 index 00000000000..ca3e37d0158 --- /dev/null +++ b/protogen/gen/ocis/services/accounts/v1/accounts.mock.go @@ -0,0 +1,90 @@ +package v1 + +import ( + context "context" + + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + client "go-micro.dev/v4/client" + empty "google.golang.org/protobuf/types/known/emptypb" +) + +// MockAccountsService can be used to write tests +/* +To create a mock overwrite the functions of an instance like this: + +```go +func mockAccSvc(retErr bool) proto.AccountsService { + if retErr { + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return nil, fmt.Errorf("error returned by mockAccountsService LIST") + }, + } + } + + return &proto.MockAccountsService{ + ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { + return &proto.ListAccountsResponse{ + Accounts: []*proto.Account{ + { + Id: "yay", + }, + }, + }, nil + }, + } +} +``` +*/ +type MockAccountsService struct { + ListFunc func(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) + GetFunc func(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) + CreateFunc func(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) + UpdateFunc func(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) + DeleteFunc func(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) +} + +// ListAccounts will panic if the function has been called, but not mocked +func (m MockAccountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { + if m.ListFunc != nil { + return m.ListFunc(ctx, in, opts...) + } + + panic("ListFunc was called in test but not mocked") +} + +// GetAccount will panic if the function has been called, but not mocked +func (m MockAccountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) { + if m.GetFunc != nil { + return m.GetFunc(ctx, in, opts...) + } + + panic("GetFunc was called in test but not mocked") +} + +// CreateAccount will panic if the function has been called, but not mocked +func (m MockAccountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) { + if m.CreateFunc != nil { + return m.CreateFunc(ctx, in, opts...) + } + + panic("CreateFunc was called in test but not mocked") +} + +// UpdateAccount will panic if the function has been called, but not mocked +func (m MockAccountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) { + if m.UpdateFunc != nil { + return m.UpdateFunc(ctx, in, opts...) + } + + panic("UpdateFunc was called in test but not mocked") +} + +// DeleteAccount will panic if the function has been called, but not mocked +func (m MockAccountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { + if m.DeleteFunc != nil { + return m.DeleteFunc(ctx, in, opts...) + } + + panic("DeleteFunc was called in test but not mocked") +} diff --git a/protogen/gen/ocis/services/settings/v1/settings.mock.go b/protogen/gen/ocis/services/settings/v1/settings.mock.go new file mode 100644 index 00000000000..fe509d9dcbb --- /dev/null +++ b/protogen/gen/ocis/services/settings/v1/settings.mock.go @@ -0,0 +1,186 @@ +package v1 + +import ( + "context" + + "go-micro.dev/v4/client" + "google.golang.org/protobuf/types/known/emptypb" +) + +// MockBundleService can be used to write tests against the bundle service. +/* +To create a mock overwrite the functions of an instance like this: + +```go +func mockBundleSvc(returnErr bool) proto.BundleService { + if returnErr { + return &proto.MockBundleService{ + ListBundlesFunc: func(ctx context.Context, in *proto.ListBundlesRequest, opts ...client.CallOption) (out *proto.ListBundlesResponse, err error) { + return nil, fmt.Errorf("error returned by mockBundleSvc LIST") + }, + } + } + + return &proto.MockBundleService{ + ListBundlesFunc: func(ctx context.Context, in *proto.ListBundlesRequest, opts ...client.CallOption) (out *proto.ListBundlesResponse, err error) { + return &proto.ListBundlesResponse{ + Bundles: []*proto.Bundle{ + { + Id: "hello-there", + }, + }, + }, nil + }, + } +} +``` +*/ +type MockBundleService struct { + ListBundlesFunc func(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) + GetBundleFunc func(ctx context.Context, req *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) + SaveBundleFunc func(ctx context.Context, req *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) + AddSettingToBundleFunc func(ctx context.Context, req *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) + RemoveSettingFromBundleFunc func(ctx context.Context, req *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) +} + +// ListBundles will panic if the function has been called, but not mocked +func (m MockBundleService) ListBundles(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { + if m.ListBundlesFunc != nil { + return m.ListBundlesFunc(ctx, req, opts...) + } + panic("ListBundlesFunc was called in test but not mocked") +} + +// GetBundle will panic if the function has been called, but not mocked +func (m MockBundleService) GetBundle(ctx context.Context, req *GetBundleRequest, opts ...client.CallOption) (*GetBundleResponse, error) { + if m.GetBundleFunc != nil { + return m.GetBundleFunc(ctx, req, opts...) + } + panic("GetBundleFunc was called in test but not mocked") +} + +// SaveBundle will panic if the function has been called, but not mocked +func (m MockBundleService) SaveBundle(ctx context.Context, req *SaveBundleRequest, opts ...client.CallOption) (*SaveBundleResponse, error) { + if m.SaveBundleFunc != nil { + return m.SaveBundleFunc(ctx, req, opts...) + } + panic("SaveBundleFunc was called in test but not mocked") +} + +// AddSettingToBundle will panic if the function has been called, but not mocked +func (m MockBundleService) AddSettingToBundle(ctx context.Context, req *AddSettingToBundleRequest, opts ...client.CallOption) (*AddSettingToBundleResponse, error) { + if m.AddSettingToBundleFunc != nil { + return m.AddSettingToBundleFunc(ctx, req, opts...) + } + panic("AddSettingToBundleFunc was called in test but not mocked") +} + +// RemoveSettingFromBundle will panic if the function has been called, but not mocked +func (m MockBundleService) RemoveSettingFromBundle(ctx context.Context, req *RemoveSettingFromBundleRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + if m.RemoveSettingFromBundleFunc != nil { + return m.RemoveSettingFromBundleFunc(ctx, req, opts...) + } + panic("RemoveSettingFromBundleFunc was called in test but not mocked") +} + +// MockValueService can be used to write tests against the value service. +type MockValueService struct { + ListValuesFunc func(ctx context.Context, req *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) + GetValueFunc func(ctx context.Context, req *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) + GetValueByUniqueIdentifiersFunc func(ctx context.Context, req *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) + SaveValueFunc func(ctx context.Context, req *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) +} + +// ListValues will panic if the function has been called, but not mocked +func (m MockValueService) ListValues(ctx context.Context, req *ListValuesRequest, opts ...client.CallOption) (*ListValuesResponse, error) { + if m.ListValuesFunc != nil { + return m.ListValuesFunc(ctx, req, opts...) + } + panic("ListValuesFunc was called in test but not mocked") +} + +// GetValue will panic if the function has been called, but not mocked +func (m MockValueService) GetValue(ctx context.Context, req *GetValueRequest, opts ...client.CallOption) (*GetValueResponse, error) { + if m.GetValueFunc != nil { + return m.GetValueFunc(ctx, req, opts...) + } + panic("GetValueFunc was called in test but not mocked") +} + +// GetValueByUniqueIdentifiers will panic if the function has been called, but not mocked +func (m MockValueService) GetValueByUniqueIdentifiers(ctx context.Context, req *GetValueByUniqueIdentifiersRequest, opts ...client.CallOption) (*GetValueResponse, error) { + if m.GetValueByUniqueIdentifiersFunc != nil { + return m.GetValueByUniqueIdentifiersFunc(ctx, req, opts...) + } + panic("GetValueByUniqueIdentifiersFunc was called in test but not mocked") +} + +// SaveValue will panic if the function has been called, but not mocked +func (m MockValueService) SaveValue(ctx context.Context, req *SaveValueRequest, opts ...client.CallOption) (*SaveValueResponse, error) { + if m.SaveValueFunc != nil { + return m.SaveValueFunc(ctx, req, opts...) + } + panic("SaveValueFunc was called in test but not mocked") +} + +// MockRoleService will panic if the function has been called, but not mocked +type MockRoleService struct { + ListRolesFunc func(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) + ListRoleAssignmentsFunc func(ctx context.Context, req *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) + AssignRoleToUserFunc func(ctx context.Context, req *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) + RemoveRoleFromUserFunc func(ctx context.Context, req *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) +} + +// ListRoles will panic if the function has been called, but not mocked +func (m MockRoleService) ListRoles(ctx context.Context, req *ListBundlesRequest, opts ...client.CallOption) (*ListBundlesResponse, error) { + if m.ListRolesFunc != nil { + return m.ListRolesFunc(ctx, req, opts...) + } + panic("ListRolesFunc was called in test but not mocked") +} + +// ListRoleAssignments will panic if the function has been called, but not mocked +func (m MockRoleService) ListRoleAssignments(ctx context.Context, req *ListRoleAssignmentsRequest, opts ...client.CallOption) (*ListRoleAssignmentsResponse, error) { + if m.ListRoleAssignmentsFunc != nil { + return m.ListRoleAssignmentsFunc(ctx, req, opts...) + } + panic("ListRoleAssignmentsFunc was called in test but not mocked") +} + +// AssignRoleToUser will panic if the function has been called, but not mocked +func (m MockRoleService) AssignRoleToUser(ctx context.Context, req *AssignRoleToUserRequest, opts ...client.CallOption) (*AssignRoleToUserResponse, error) { + if m.AssignRoleToUserFunc != nil { + return m.AssignRoleToUserFunc(ctx, req, opts...) + } + panic("AssignRoleToUserFunc was called in test but not mocked") +} + +// RemoveRoleFromUser will panic if the function has been called, but not mocked +func (m MockRoleService) RemoveRoleFromUser(ctx context.Context, req *RemoveRoleFromUserRequest, opts ...client.CallOption) (*emptypb.Empty, error) { + if m.RemoveRoleFromUserFunc != nil { + return m.RemoveRoleFromUserFunc(ctx, req, opts...) + } + panic("RemoveRoleFromUserFunc was called in test but not mocked") +} + +// MockPermissionService will panic if the function has been called, but not mocked +type MockPermissionService struct { + ListPermissionsByResourceFunc func(ctx context.Context, req *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) + GetPermissionByIDFunc func(ctx context.Context, req *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) +} + +// ListPermissionsByResource will panic if the function has been called, but not mocked +func (m MockPermissionService) ListPermissionsByResource(ctx context.Context, req *ListPermissionsByResourceRequest, opts ...client.CallOption) (*ListPermissionsByResourceResponse, error) { + if m.ListPermissionsByResourceFunc != nil { + return m.ListPermissionsByResourceFunc(ctx, req, opts...) + } + panic("ListPermissionsByResourceFunc was called in test but not mocked") +} + +// GetPermissionByID will panic if the function has been called, but not mocked +func (m MockPermissionService) GetPermissionByID(ctx context.Context, req *GetPermissionByIDRequest, opts ...client.CallOption) (*GetPermissionByIDResponse, error) { + if m.GetPermissionByIDFunc != nil { + return m.GetPermissionByIDFunc(ctx, req, opts...) + } + panic("GetPermissionByIDFunc was called in test but not mocked") +} diff --git a/proxy/pkg/proxy/policy/selector_test.go b/proxy/pkg/proxy/policy/selector_test.go index d48566c0f5b..c8a96557818 100644 --- a/proxy/pkg/proxy/policy/selector_test.go +++ b/proxy/pkg/proxy/policy/selector_test.go @@ -9,8 +9,9 @@ import ( userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" revactx "github.com/cs3org/reva/pkg/ctx" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/oidc" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" "github.com/owncloud/ocis/proxy/pkg/config" "go-micro.dev/v4/client" ) @@ -110,18 +111,18 @@ func TestMigrationSelector(t *testing.T) { } } -func mockAccSvc(retErr bool) proto.AccountsService { +func mockAccSvc(retErr bool) accountssvc.AccountsService { if retErr { - return &proto.MockAccountsService{ - GetFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { + return &accountssvc.MockAccountsService{ + GetFunc: func(ctx context.Context, in *accountssvc.GetAccountRequest, opts ...client.CallOption) (record *accountsmsg.Account, err error) { return nil, fmt.Errorf("error returned by mockAccountsService GET") }, } } - return &proto.MockAccountsService{ - GetFunc: func(ctx context.Context, in *proto.GetAccountRequest, opts ...client.CallOption) (record *proto.Account, err error) { - return &proto.Account{}, nil + return &accountssvc.MockAccountsService{ + GetFunc: func(ctx context.Context, in *accountssvc.GetAccountRequest, opts ...client.CallOption) (record *accountsmsg.Account, err error) { + return &accountsmsg.Account{}, nil }, } diff --git a/proxy/pkg/user/backend/accounts_test.go b/proxy/pkg/user/backend/accounts_test.go index b54d070bf57..4e1f2a35612 100644 --- a/proxy/pkg/user/backend/accounts_test.go +++ b/proxy/pkg/user/backend/accounts_test.go @@ -6,17 +6,18 @@ import ( userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" "github.com/cs3org/reva/pkg/token/manager/jwt" - accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" ) -var mockAccResp = []*accounts.Account{ +var mockAccResp = []*accountsmsg.Account{ { Id: "1234", AccountEnabled: true, @@ -26,7 +27,7 @@ var mockAccResp = []*accounts.Account{ GidNumber: 2, Mail: "foo@example.org", OnPremisesSamAccountName: "samaccount", - MemberOf: []*accounts.Group{ + MemberOf: []*accountsmsg.Group{ {OnPremisesSamAccountName: "g1"}, {OnPremisesSamAccountName: "g2"}, }, @@ -64,7 +65,7 @@ func TestGetUserByClaimsFound(t *testing.T) { } func TestGetUserByClaimsNotFound(t *testing.T) { - accBackend := newAccountsBackend([]*accounts.Account{}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{}, expectedRoles) u, _, err := accBackend.GetUserByClaims(context.Background(), "mail", "foo@example.com", true) @@ -74,7 +75,7 @@ func TestGetUserByClaimsNotFound(t *testing.T) { } func TestGetUserByClaimsInvalidClaim(t *testing.T) { - accBackend := newAccountsBackend([]*accounts.Account{}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{}, expectedRoles) u, _, err := accBackend.GetUserByClaims(context.Background(), "invalidClaimName", "efwfwfwfe", true) assert.Nil(t, u) @@ -82,7 +83,7 @@ func TestGetUserByClaimsInvalidClaim(t *testing.T) { } func TestGetUserByClaimsDisabledAccount(t *testing.T) { - accBackend := newAccountsBackend([]*accounts.Account{{AccountEnabled: false}}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{{AccountEnabled: false}}, expectedRoles) u, _, err := accBackend.GetUserByClaims(context.Background(), "mail", "foo@example.com", true) assert.Nil(t, u) @@ -100,7 +101,7 @@ func TestAuthenticate(t *testing.T) { } func TestAuthenticateFailed(t *testing.T) { - accBackend := newAccountsBackend([]*accounts.Account{}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{}, expectedRoles) u, _, err := accBackend.Authenticate(context.Background(), "foo", "secret") assert.Nil(t, u) @@ -109,7 +110,7 @@ func TestAuthenticateFailed(t *testing.T) { func TestCreateUserFromClaims(t *testing.T) { exp := mockAccResp[0] - accBackend := newAccountsBackend([]*accounts.Account{}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{}, expectedRoles) act, _ := accBackend.CreateUserFromClaims(context.Background(), map[string]interface{}{ oidc.Name: mockAccResp[0].DisplayName, oidc.PreferredUsername: mockAccResp[0].OnPremisesSamAccountName, @@ -127,11 +128,11 @@ func TestCreateUserFromClaims(t *testing.T) { } func TestGetUserGroupsUnimplemented(t *testing.T) { - accBackend := newAccountsBackend([]*accounts.Account{}, expectedRoles) + accBackend := newAccountsBackend([]*accountsmsg.Account{}, expectedRoles) assert.Panics(t, func() { accBackend.GetUserGroups(context.Background(), "foo") }) } -func assertUserMatchesAccount(t *testing.T, exp *accounts.Account, act *userv1beta1.User) { +func assertUserMatchesAccount(t *testing.T, exp *accountsmsg.Account, act *userv1beta1.User) { // User assert.NotNil(t, act.Id) assert.Equal(t, exp.Id, act.Id.OpaqueId) @@ -151,7 +152,7 @@ func assertUserMatchesAccount(t *testing.T, exp *accounts.Account, act *userv1be assert.Equal(t, int64(2), act.GidNumber) } -func newAccountsBackend(mockAccounts []*accounts.Account, mockRoles []*settingsmsg.UserRoleAssignment) UserBackend { +func newAccountsBackend(mockAccounts []*accountsmsg.Account, mockRoles []*settingsmsg.UserRoleAssignment) UserBackend { accSvc, roleSvc := getAccountService(mockAccounts, nil), getRoleService(mockRoles, nil) tokenManager, _ := jwt.New(map[string]interface{}{ "secret": "change-me", @@ -162,12 +163,12 @@ func newAccountsBackend(mockAccounts []*accounts.Account, mockRoles []*settingsm return accBackend } -func getAccountService(expectedResponse []*accounts.Account, err error) *accounts.MockAccountsService { - return &accounts.MockAccountsService{ - ListFunc: func(ctx context.Context, in *accounts.ListAccountsRequest, opts ...client.CallOption) (*accounts.ListAccountsResponse, error) { - return &accounts.ListAccountsResponse{Accounts: expectedResponse}, err +func getAccountService(expectedResponse []*accountsmsg.Account, err error) *accountssvc.MockAccountsService { + return &accountssvc.MockAccountsService{ + ListFunc: func(ctx context.Context, in *accountssvc.ListAccountsRequest, opts ...client.CallOption) (*accountssvc.ListAccountsResponse, error) { + return &accountssvc.ListAccountsResponse{Accounts: expectedResponse}, err }, - CreateFunc: func(ctx context.Context, in *accounts.CreateAccountRequest, opts ...client.CallOption) (*accounts.Account, error) { + CreateFunc: func(ctx context.Context, in *accountssvc.CreateAccountRequest, opts ...client.CallOption) (*accountsmsg.Account, error) { a := in.Account a.Id = "1234" return a, nil From e877603d6d1384bbf7491d79b7d805b6c868de5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 13 Jan 2022 11:34:38 +0100 Subject: [PATCH 12/20] Adjust Makefile and regenerate protobuf --- Makefile | 21 +++++++++++++++---- .../accounts/v1/accounts.swagger.json | 9 +++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index de9c6924ba6..6932cff7861 100644 --- a/Makefile +++ b/Makefile @@ -163,11 +163,24 @@ go-coverage: echo -n "% coverage $$mod: "; $(MAKE) --no-print-directory -C $$mod go-coverage; \ done +# bingo creates symlinks from the -l option in GOBIN, from where +# we can easily use it with buf. To have the symlinks inside this +# repo and on a known location, we set GOBIN to .bingo in the root +# of the repository (therefore we need to cd ..) +.PHONY: protoc-deps +protoc-deps: $(BINGO) + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc + +.PHONY: buf-generate +buf-generate: $(BUF) protoc-deps + cd protogen/proto && $(BUF) generate + .PHONY: protobuf -protobuf: - @for mod in $(OCIS_MODULES); do \ - echo -n "% protobuf $$mod: "; $(MAKE) --no-print-directory -C $$mod protobuf; \ - done +protobuf: buf-generate .PHONY: bingo-update bingo-update: $(BINGO) diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json index e81d6f903cb..37c4e9bed26 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -389,7 +389,8 @@ "description": "The id of the group to add a member to", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "body", @@ -435,7 +436,8 @@ "description": "The id of the group to remove a member from", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "accountId", @@ -482,7 +484,8 @@ "description": "The id of the group to list members from", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "body", From 8efcbb379a9e3fa7aa0e5674bc03d67068c0ea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 13 Jan 2022 11:50:37 +0100 Subject: [PATCH 13/20] Cleanup leftovers --- .make/protobuf.mk | 16 ---------------- accounts/Makefile | 9 --------- accounts/buf.gen.yaml | 29 ----------------------------- accounts/buf.lock | 17 ----------------- accounts/buf.yaml | 10 ---------- settings/Makefile | 9 --------- settings/buf.gen.yaml | 29 ----------------------------- settings/buf.lock | 17 ----------------- settings/buf.yaml | 10 ---------- store/Makefile | 9 --------- store/buf.gen.yaml | 30 ------------------------------ store/buf.lock | 17 ----------------- store/buf.yaml | 10 ---------- thumbnails/Makefile | 9 --------- thumbnails/buf.gen.yaml | 30 ------------------------------ thumbnails/buf.lock | 17 ----------------- thumbnails/buf.yaml | 10 ---------- 17 files changed, 278 deletions(-) delete mode 100644 .make/protobuf.mk delete mode 100644 accounts/buf.gen.yaml delete mode 100644 accounts/buf.lock delete mode 100644 accounts/buf.yaml delete mode 100644 settings/buf.gen.yaml delete mode 100644 settings/buf.lock delete mode 100644 settings/buf.yaml delete mode 100644 store/buf.gen.yaml delete mode 100644 store/buf.lock delete mode 100644 store/buf.yaml delete mode 100644 thumbnails/buf.gen.yaml delete mode 100644 thumbnails/buf.lock delete mode 100644 thumbnails/buf.yaml diff --git a/.make/protobuf.mk b/.make/protobuf.mk deleted file mode 100644 index 21e74cbe4fc..00000000000 --- a/.make/protobuf.mk +++ /dev/null @@ -1,16 +0,0 @@ -# bingo creates symlinks from the -l option in GOBIN, from where -# we can easily use it with buf. To have the symlinks inside this -# repo and on a known location, we set GOBIN to .bingo in the root -# of the repository (therefore we need to cd ..) -.PHONY: protoc-deps -protoc-deps: $(BINGO) - @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go - @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 - @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb - @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 - @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc - -.PHONY: buf-generate -buf-generate: $(BUF) protoc-deps - $(BUF) generate - diff --git a/accounts/Makefile b/accounts/Makefile index 975ab4de28b..9b0678468fc 100644 --- a/accounts/Makefile +++ b/accounts/Makefile @@ -47,12 +47,3 @@ yarn-build: node_modules .PHONY: node_modules node_modules: yarn install --immutable - -############ protobuf ############ -PROTO_VERSION := v0 -PROTO_SRC := pkg/proto/$(PROTO_VERSION) - -include ../.make/protobuf.mk - -.PHONY: protobuf -protobuf: buf-generate diff --git a/accounts/buf.gen.yaml b/accounts/buf.gen.yaml deleted file mode 100644 index 35a2098bec6..00000000000 --- a/accounts/buf.gen.yaml +++ /dev/null @@ -1,29 +0,0 @@ -version: v1 -plugins: - - name: go - path: ../.bingo/protoc-gen-go - out: pkg/ - opt: - - paths=source_relative - - - name: micro - path: ../.bingo/protoc-gen-micro - out: pkg/ - opt: - - paths=source_relative - - - name: microweb - path: ../.bingo/protoc-gen-microweb - out: pkg/ - opt: - - paths=source_relative - - - name: openapiv2 - path: ../.bingo/protoc-gen-openapiv2 - out: pkg/ - - - name: doc - path: ../.bingo/protoc-gen-doc - out: ../docs/extensions/accounts - opt: - - ./templates/GRPC.tmpl,grpc.md diff --git a/accounts/buf.lock b/accounts/buf.lock deleted file mode 100644 index 65d8433686f..00000000000 --- a/accounts/buf.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - branch: main - commit: ca45b9d9c51849e898845743a28b0eb0 - digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw= - create_time: 2021-10-14T15:09:30.598677Z - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - branch: main - commit: 462ede5f3dee45569df6317bda220b1b - digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0= - create_time: 2021-10-14T01:55:03.476639Z diff --git a/accounts/buf.yaml b/accounts/buf.yaml deleted file mode 100644 index 8d96e03b598..00000000000 --- a/accounts/buf.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway -breaking: - use: - - FILE diff --git a/settings/Makefile b/settings/Makefile index 349b780ac68..c838ab93a3b 100644 --- a/settings/Makefile +++ b/settings/Makefile @@ -48,12 +48,3 @@ yarn-build: node_modules .PHONY: node_modules node_modules: yarn install --immutable - -############ protobuf ############ -PROTO_VERSION := v0 -PROTO_SRC := pkg/proto/$(PROTO_VERSION) - -include ../.make/protobuf.mk - -.PHONY: protobuf -protobuf: buf-generate diff --git a/settings/buf.gen.yaml b/settings/buf.gen.yaml deleted file mode 100644 index 41f10995cc8..00000000000 --- a/settings/buf.gen.yaml +++ /dev/null @@ -1,29 +0,0 @@ -version: v1 -plugins: - - name: go - path: ../.bingo/protoc-gen-go - out: pkg/ - opt: - - paths=source_relative - - - name: micro - path: ../.bingo/protoc-gen-micro - out: pkg/ - opt: - - paths=source_relative - - - name: microweb - path: ../.bingo/protoc-gen-microweb - out: pkg/ - opt: - - paths=source_relative - - - name: openapiv2 - path: ../.bingo/protoc-gen-openapiv2 - out: pkg/ - - - name: doc - path: ../.bingo/protoc-gen-doc - out: ../docs/extensions/settings - opt: - - ./templates/GRPC.tmpl,grpc.md diff --git a/settings/buf.lock b/settings/buf.lock deleted file mode 100644 index 65d8433686f..00000000000 --- a/settings/buf.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - branch: main - commit: ca45b9d9c51849e898845743a28b0eb0 - digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw= - create_time: 2021-10-14T15:09:30.598677Z - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - branch: main - commit: 462ede5f3dee45569df6317bda220b1b - digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0= - create_time: 2021-10-14T01:55:03.476639Z diff --git a/settings/buf.yaml b/settings/buf.yaml deleted file mode 100644 index 8d96e03b598..00000000000 --- a/settings/buf.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway -breaking: - use: - - FILE diff --git a/store/Makefile b/store/Makefile index c227d2f8126..8fbe07b3059 100644 --- a/store/Makefile +++ b/store/Makefile @@ -30,12 +30,3 @@ ci-go-generate: protobuf # CI runs ci-node-generate automatically before this ta .PHONY: ci-node-generate ci-node-generate: - -############ protobuf ############ -PROTO_VERSION := v0 -PROTO_SRC := pkg/proto/$(PROTO_VERSION) - -include ../.make/protobuf.mk - -.PHONY: protobuf -protobuf: buf-generate diff --git a/store/buf.gen.yaml b/store/buf.gen.yaml deleted file mode 100644 index a836d201cd2..00000000000 --- a/store/buf.gen.yaml +++ /dev/null @@ -1,30 +0,0 @@ -version: v1 -plugins: - - name: go - path: ../.bingo/protoc-gen-go - out: pkg/ - opt: - - paths=source_relative - - - name: micro - path: ../.bingo/protoc-gen-micro - out: pkg/ - opt: - - paths=source_relative - - # not needed for store - #- name: microweb - # path: ../.bingo/protoc-gen-microweb - # out: pkg/ - # opt: - # - paths=source_relative - - - name: openapiv2 - path: ../.bingo/protoc-gen-openapiv2 - out: pkg/ - - - name: doc - path: ../.bingo/protoc-gen-doc - out: ../docs/extensions/store - opt: - - ./templates/GRPC.tmpl,grpc.md diff --git a/store/buf.lock b/store/buf.lock deleted file mode 100644 index 65d8433686f..00000000000 --- a/store/buf.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - branch: main - commit: ca45b9d9c51849e898845743a28b0eb0 - digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw= - create_time: 2021-10-14T15:09:30.598677Z - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - branch: main - commit: 462ede5f3dee45569df6317bda220b1b - digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0= - create_time: 2021-10-14T01:55:03.476639Z diff --git a/store/buf.yaml b/store/buf.yaml deleted file mode 100644 index 8d96e03b598..00000000000 --- a/store/buf.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway -breaking: - use: - - FILE diff --git a/thumbnails/Makefile b/thumbnails/Makefile index 41dd62ceda6..a083f93166c 100644 --- a/thumbnails/Makefile +++ b/thumbnails/Makefile @@ -29,12 +29,3 @@ ci-go-generate: protobuf # CI runs ci-node-generate automatically before this ta .PHONY: ci-node-generate ci-node-generate: - -############ protobuf ############ -PROTO_VERSION := v0 -PROTO_SRC := pkg/proto/$(PROTO_VERSION) - -include ../.make/protobuf.mk - -.PHONY: protobuf -protobuf: buf-generate diff --git a/thumbnails/buf.gen.yaml b/thumbnails/buf.gen.yaml deleted file mode 100644 index 26f39c7eded..00000000000 --- a/thumbnails/buf.gen.yaml +++ /dev/null @@ -1,30 +0,0 @@ -version: v1 -plugins: - - name: go - path: ../.bingo/protoc-gen-go - out: pkg/ - opt: - - paths=source_relative - - - name: micro - path: ../.bingo/protoc-gen-micro - out: pkg/ - opt: - - paths=source_relative - - # not needed for thumbnails - #- name: microweb - # path: ../.bingo/protoc-gen-microweb - # out: pkg/ - # opt: - # - paths=source_relative - - - name: openapiv2 - path: ../.bingo/protoc-gen-openapiv2 - out: pkg/ - - - name: doc - path: ../.bingo/protoc-gen-doc - out: ../docs/extensions/accounts - opt: - - ./templates/GRPC.tmpl,grpc.md diff --git a/thumbnails/buf.lock b/thumbnails/buf.lock deleted file mode 100644 index 65d8433686f..00000000000 --- a/thumbnails/buf.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: googleapis - repository: googleapis - branch: main - commit: ca45b9d9c51849e898845743a28b0eb0 - digest: b1--B2JdvzLV2KI5pYMG9AHJHFGznqXfZKjKwcqBuXhGgw= - create_time: 2021-10-14T15:09:30.598677Z - - remote: buf.build - owner: grpc-ecosystem - repository: grpc-gateway - branch: main - commit: 462ede5f3dee45569df6317bda220b1b - digest: b1-4FNKWjnS2yafyeOdqW8u-s7w1pJBHjz0Z6CbOL-Ipk0= - create_time: 2021-10-14T01:55:03.476639Z diff --git a/thumbnails/buf.yaml b/thumbnails/buf.yaml deleted file mode 100644 index 8d96e03b598..00000000000 --- a/thumbnails/buf.yaml +++ /dev/null @@ -1,10 +0,0 @@ -version: v1 -lint: - use: - - DEFAULT -deps: - - buf.build/googleapis/googleapis - - buf.build/grpc-ecosystem/grpc-gateway -breaking: - use: - - FILE From 23c642fbbc579b8e53781ebea1be199e41ba053b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 19 Jan 2022 18:49:31 +0100 Subject: [PATCH 14/20] Remove autogenerated docs for proto files from the repo --- .../ocis/messages/accounts/v1/grpc.md | 139 --------- .../ocis/messages/settings/v1/grpc.md | 253 ---------------- .../extensions/ocis/messages/store/v1/grpc.md | 121 -------- .../ocis/messages/thumbnails/v1/grpc.md | 57 ---- .../ocis/services/accounts/v1/grpc.md | 252 --------------- .../ocis/services/settings/v1/grpc.md | 286 ------------------ .../extensions/ocis/services/store/v1/grpc.md | 139 --------- .../ocis/services/thumbnails/v1/grpc.md | 74 ----- 8 files changed, 1321 deletions(-) delete mode 100644 protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/messages/settings/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/messages/store/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/services/accounts/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/services/settings/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/services/store/v1/grpc.md delete mode 100644 protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md diff --git a/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md b/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md deleted file mode 100644 index 17b96362e70..00000000000 --- a/protogen/docs/extensions/ocis/messages/accounts/v1/grpc.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/messages/accounts/v1/accounts.proto - -### Account - -Account follows the properties of the ms graph api user resource. -See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. | -| account_enabled | [bool](#bool) | | true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. | -| is_resource_account | [bool](#bool) | | A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. You could give printers or machines with a sync client resource accounts as well. A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. | -| creation_type | [string](#string) | | Indicates whether the account was created as - a regular school or work account ("" / emptystring), - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - an external account (Invitation), - self-service sign-up using email verification (EmailVerified). Read-only. | -| identities | [Identities](#identities) | repeated | Represents the identities that can be used to sign in to this account. An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. May contain multiple items with the same signInType value. Supports $filter. | -| display_name | [string](#string) | | The name displayed in the address book for the account. This is usually the combination of the user's first name, middle initial and last name. This property is required when a user is created and it cannot be cleared during updates. Supports $filter and $orderby. posixaccount MUST cn | -| preferred_name | [string](#string) | | The username posixaccount MUST uid | -| uid_number | [int64](#int64) | | TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users used for exposing the user using ldap posixaccount MUST uidnumber | -| gid_number | [int64](#int64) | | used for exposing the user using ldap posixaccount MUST gidnumber | -| mail | [string](#string) | | The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. inetorgperson MAY mail | -| description | [string](#string) | | A description, useful for resource accounts posixaccount MAY description | -| password_profile | [PasswordProfile](#passwordprofile) | | Specifies the password profile for the user. The profile contains the user’s password. This property is required when a user is created. The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. By default, a strong password is required. posixaccount MAY authPassword | -| memberOf | [Group](#group) | repeated | The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. should we only respond with repeated strings of ids? no clients should a proper filter mask! | -| created_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The created date of the account object. | -| deleted_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The date and time the user was deleted. Returned only on $select. | -| on_premises_sync_enabled | [bool](#bool) | | true* if this object is synced from an on-premises directory; *false* if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only | -| on_premises_immutable_id | [string](#string) | | This property is used to associate an on-premises LDAP user to the oCIS account object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. | -| on_premises_security_identifier | [string](#string) | | Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. | -| on_premises_distinguished_name | [string](#string) | | Contains the on-premises LDAP `distinguished name` or `DN`. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | -| on_premises_sam_account_name | [string](#string) | | Contains the on-premises `samAccountName` synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | -| on_premises_domain_name | [string](#string) | | Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | -| on_premises_user_principal_name | [string](#string) | | Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | -| on_premises_last_sync_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Indicates the last time at which the object was synced with the on-premises directory; Read-only. | -| on_premises_provisioning_errors | [OnPremisesProvisioningError](#onpremisesprovisioningerror) | repeated | Errors when using synchronization during provisioning. | -| external_user_state | [string](#string) | | For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. | -| external_user_state_change_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. | -| refresh_tokens_valid_from_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. | -| sign_in_sessions_valid_from_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. Read-only. Use revokeSignInSessions to reset. | - -### Group - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | The unique identifier for the group. Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. | -| display_name | [string](#string) | | The display name for the group. This property is required when a group is created and cannot be cleared during updates. Returned by default. Supports $filter and $orderby. groupofnames MUST cn - -groupofnames MUST/MAY member | -| members | [Account](#account) | repeated | Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later | -| owners | [Account](#account) | repeated | groupofnames MAY businessCategory groupofnames MAY o groupofnames MAY ou groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners | -| description | [string](#string) | | An optional description for the group. Returned by default. groupofnames MAY description | -| gid_number | [int64](#int64) | | used for exposing the user using ldap posixgroup MUST gidnumber - -posixgroup MAY authPassword posixgroup MAY userPassword posixgroup MAY memberUid -> groupofnames member posixgroup MAY description -> groupofnames | -| created_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created Returned by default. Read-only. | -| deleted_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. Returned by default. Read-only. | -| expiration_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. Returned by default. Read-only. | -| hide_from_address_lists | [bool](#bool) | | True if the group is not displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. Returned only on $select. | -| visibility | [string](#string) | | Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. Visibility can be set only when a group is created; it is not editable. Returned by default. | -| on_premises_sync_enabled | [bool](#bool) | | true* if this group is synced from an on-premises directory; *false* if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter. | -| on_premises_immutable_id | [string](#string) | | This property is used to associate an on-premises LDAP user to the oCIS account object. This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. | -| on_premises_security_identifier | [string](#string) | | Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. | -| on_premises_distinguished_name | [string](#string) | | Contains the on-premises LDAP `distinguished name` or `DN`. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. | -| on_premises_sam_account_name | [string](#string) | | Contains the on-premises `samAccountName` synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. | -| on_premises_domain_name | [string](#string) | | Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Returned by default. Read-only. | -| on_premises_net_bios_name | [string](#string) | | Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Returned by default. Read-only. | -| on_premises_last_sync_date_time | [string](#string) | | Indicates the last time at which the group was synced with the on-premises directory. Returned by default. Read-only. Supports $filter. | -| on_premises_provisioning_errors | [OnPremisesProvisioningError](#onpremisesprovisioningerror) | repeated | Errors when using synchronization during provisioning. | - -### Identities - -Identities Represents an identity used to sign in to a user account. -An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. -This enables the user to sign in to the user account with any of those associated identities. -They are also used to keep a history of old usernames. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| sign_in_type | [string](#string) | | Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. This property can also be set to any custom string. | -| issuer | [string](#string) | | Specifies the issuer of the identity, for example facebook.com. For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com. For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com. Supports $filter. 512 character limit. | -| issuer_assigned_id | [string](#string) | | Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). When *signInType* is set to: * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address * `userName`, issuer_assigned_id must be a valid local part of an email address Supports $filter. 512 character limit. | - -### OnPremisesProvisioningError - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| category | [string](#string) | | Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. | -| occurred_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The date and time at which the error occurred. | -| property_causing_error | [string](#string) | | Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress | -| value | [string](#string) | | Value of the property causing the error. | - -### PasswordProfile - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| password | [string](#string) | | The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. | -| last_password_change_date_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | The time when this account last changed their password. | -| password_policies | [string](#string) | repeated | Specifies password policies for the user. This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. “DisablePasswordExpiration” can also be specified. | -| force_change_password_next_sign_in | [bool](#bool) | | true* if the user must change her password on the next login; otherwise false. | -| force_change_password_next_sign_in_with_mfa | [bool](#bool) | | If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. | - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md b/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md deleted file mode 100644 index 74aa5597602..00000000000 --- a/protogen/docs/extensions/ocis/messages/settings/v1/grpc.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/messages/settings/v1/settings.proto - -### Bool - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| default | [bool](#bool) | | | -| label | [string](#string) | | | - -### Bundle - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | -| name | [string](#string) | | | -| type | [Bundle.Type](#bundletype) | | | -| extension | [string](#string) | | | -| display_name | [string](#string) | | | -| settings | [Setting](#setting) | repeated | | -| resource | [Resource](#resource) | | | - -### Identifier - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| extension | [string](#string) | | | -| bundle | [string](#string) | | | -| setting | [string](#string) | | | - -### Int - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| default | [int64](#int64) | | | -| min | [int64](#int64) | | | -| max | [int64](#int64) | | | -| step | [int64](#int64) | | | -| placeholder | [string](#string) | | | - -### ListOption - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [ListOptionValue](#listoptionvalue) | | | -| default | [bool](#bool) | | | -| display_value | [string](#string) | | | - -### ListOptionValue - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| string_value | [string](#string) | | | -| int_value | [int64](#int64) | | | - -### ListValue - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| values | [ListOptionValue](#listoptionvalue) | repeated | | - -### MultiChoiceList - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| options | [ListOption](#listoption) | repeated | | - -### Permission - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| operation | [Permission.Operation](#permissionoperation) | | | -| constraint | [Permission.Constraint](#permissionconstraint) | | | - -### Resource - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [Resource.Type](#resourcetype) | | | -| id | [string](#string) | | | - -### Setting - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | -| name | [string](#string) | | | -| display_name | [string](#string) | | | -| description | [string](#string) | | | -| int_value | [Int](#int) | | | -| string_value | [String](#string) | | | -| bool_value | [Bool](#bool) | | | -| single_choice_value | [SingleChoiceList](#singlechoicelist) | | | -| multi_choice_value | [MultiChoiceList](#multichoicelist) | | | -| permission_value | [Permission](#permission) | | | -| resource | [Resource](#resource) | | | - -### SingleChoiceList - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| options | [ListOption](#listoption) | repeated | | - -### String - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| default | [string](#string) | | | -| required | [bool](#bool) | | | -| min_length | [int32](#int32) | | | -| max_length | [int32](#int32) | | | -| placeholder | [string](#string) | | | - -### UserRoleAssignment - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | id is generated upon saving the assignment | -| account_uuid | [string](#string) | | | -| role_id | [string](#string) | | the role_id is a bundle_id internally | - -### Value - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | id is the id of the Value. It is generated on saving it. | -| bundle_id | [string](#string) | | | -| setting_id | [string](#string) | | setting_id is the id of the setting from within its bundle. | -| account_uuid | [string](#string) | | | -| resource | [Resource](#resource) | | | -| bool_value | [bool](#bool) | | | -| int_value | [int64](#int64) | | | -| string_value | [string](#string) | | | -| list_value | [ListValue](#listvalue) | | | - -### ValueWithIdentifier - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| identifier | [Identifier](#identifier) | | | -| value | [Value](#value) | | | - -### Bundle.Type - - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| TYPE_UNKNOWN | 0 | | -| TYPE_DEFAULT | 1 | | -| TYPE_ROLE | 2 | | -### Permission.Constraint - - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| CONSTRAINT_UNKNOWN | 0 | | -| CONSTRAINT_OWN | 1 | | -| CONSTRAINT_SHARED | 2 | | -| CONSTRAINT_ALL | 3 | | -### Permission.Operation - - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| OPERATION_UNKNOWN | 0 | | -| OPERATION_CREATE | 1 | | -| OPERATION_READ | 2 | | -| OPERATION_UPDATE | 3 | | -| OPERATION_DELETE | 4 | | -| OPERATION_WRITE | 5 | WRITE is a combination of CREATE and UPDATE | -| OPERATION_READWRITE | 6 | READWRITE is a combination of READ and WRITE | -### Resource.Type - - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| TYPE_UNKNOWN | 0 | | -| TYPE_SYSTEM | 1 | | -| TYPE_FILE | 2 | | -| TYPE_SHARE | 3 | | -| TYPE_SETTING | 4 | | -| TYPE_BUNDLE | 5 | | -| TYPE_USER | 6 | | -| TYPE_GROUP | 7 | | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/messages/store/v1/grpc.md b/protogen/docs/extensions/ocis/messages/store/v1/grpc.md deleted file mode 100644 index b092553d14a..00000000000 --- a/protogen/docs/extensions/ocis/messages/store/v1/grpc.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/messages/store/v1/store.proto - -### DeleteOptions - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| database | [string](#string) | | | -| table | [string](#string) | | | - -### Field - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [string](#string) | | type of value e.g string, int, int64, bool, float64 | -| value | [string](#string) | | the actual value | - -### ListOptions - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| database | [string](#string) | | | -| table | [string](#string) | | | -| prefix | [string](#string) | | | -| suffix | [string](#string) | | | -| limit | [uint64](#uint64) | | | -| offset | [uint64](#uint64) | | | - -### ReadOptions - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| database | [string](#string) | | | -| table | [string](#string) | | | -| prefix | [bool](#bool) | | | -| suffix | [bool](#bool) | | | -| limit | [uint64](#uint64) | | | -| offset | [uint64](#uint64) | | | -| where | [ReadOptions.WhereEntry](#readoptionswhereentry) | repeated | | - -### ReadOptions.WhereEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Field](#field) | | | - -### Record - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | key of the recorda | -| value | [bytes](#bytes) | | value in the record | -| expiry | [int64](#int64) | | time.Duration (signed int64 nanoseconds) | -| metadata | [Record.MetadataEntry](#recordmetadataentry) | repeated | the associated metadata | - -### Record.MetadataEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Field](#field) | | | - -### WriteOptions - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| database | [string](#string) | | | -| table | [string](#string) | | | -| expiry | [int64](#int64) | | time.Time | -| ttl | [int64](#int64) | | time.Duration | - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md b/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md deleted file mode 100644 index 645c3dfc13f..00000000000 --- a/protogen/docs/extensions/ocis/messages/thumbnails/v1/grpc.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/messages/thumbnails/v1/thumbnails.proto - -### CS3Source - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| path | [string](#string) | | | -| authorization | [string](#string) | | | - -### WebdavSource - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| url | [string](#string) | | REQUIRED. | -| is_public_link | [bool](#bool) | | REQUIRED. | -| webdav_authorization | [string](#string) | | OPTIONAL. | -| reva_authorization | [string](#string) | | OPTIONAL. | -| public_link_token | [string](#string) | | OPTIONAL. | - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md b/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md deleted file mode 100644 index 5118f5588d6..00000000000 --- a/protogen/docs/extensions/ocis/services/accounts/v1/grpc.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/services/accounts/v1/accounts.proto - -### AddMemberRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| group_id | [string](#string) | | The id of the group to add a member to | -| account_id | [string](#string) | | The account id to add | - -### CreateAccountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| account | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | | The account resource to create | - -### CreateGroupRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| group | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | | The account resource to create | - -### DeleteAccountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### DeleteGroupRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### GetAccountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### GetGroupRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### ListAccountsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| page_size | [int32](#int32) | | Optional. The maximum number of accounts to return in the response | -| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | -| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | -| query | [string](#string) | | Optional. Search criteria used to select the accounts to return. If no search criteria is specified then all accounts will be returned - -TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. - -The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. - -Some example queries are: - -* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `email=foo@example.com` returns accounts with `email` set to `foo@example.com` * Query `display_name=\\"Test String\\"` returns accounts with display names that include both "Test" and "String" | - -### ListAccountsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| accounts | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | repeated | The field name should match the noun "accounts" in the method name. There will be a maximum number of items returned based on the page_size field in the request | -| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | - -### ListGroupsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| page_size | [int32](#int32) | | Optional. The maximum number of groups to return in the response | -| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | -| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | -| query | [string](#string) | | Optional. Search criteria used to select the groups to return. If no search criteria is specified then all groups will be returned - -TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. - -The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. - -Some example queries are: - -* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `display_name=\\"Test String\\"` returns groups with display names that include both "Test" and "String" | - -### ListGroupsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| groups | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | repeated | The field name should match the noun "group" in the method name. There will be a maximum number of items returned based on the page_size field in the request | -| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | - -### ListMembersRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| page_size | [int32](#int32) | | | -| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get` that indicates from where search should continue | -| field_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | Optional. Used to specify a subset of fields that should be returned by a get operation or modified by an update operation. | -| query | [string](#string) | | Optional. Search criteria used to select the groups to return. If no search criteria is specified then all groups will be returned - -TODO update query language Query expressions can be used to restrict results based upon the account properties where the operators `=`, `NOT`, `AND` and `OR` can be used along with the suffix wildcard symbol `*`. - -The string properties in a query expression should use escaped quotes for values that include whitespace to prevent unexpected behavior. - -Some example queries are: - -* Query `display_name=Th*` returns accounts whose display_name starts with "Th" * Query `display_name=\\"Test String\\"` returns groups with display names that include both "Test" and "String" | -| id | [string](#string) | | The id of the group to list members from | - -### ListMembersResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| members | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | repeated | The field name should match the noun "members" in the method name. There will be a maximum number of items returned based on the page_size field in the request | -| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no more results in the list | - -### RebuildIndexRequest - - - - -### RebuildIndexResponse - - - - -### RemoveMemberRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| group_id | [string](#string) | | The id of the group to remove a member from | -| account_id | [string](#string) | | The account id to remove | - -### UpdateAccountRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| account | [ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | | The account resource which replaces the resource on the server | -| update_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask | - -### UpdateGroupRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| group | [ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | | The group resource which replaces the resource on the server | -| update_mask | [google.protobuf.FieldMask](#googleprotobuffieldmask) | | The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask | - - -### AccountsService - -Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods -https://cloud.google.com/apis/design/standard_methods?hl=de#list -https://cloud.google.com/apis/design/naming_convention?hl=de - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListAccounts | [ListAccountsRequest](#listaccountsrequest) | [ListAccountsResponse](#listaccountsresponse) | Lists accounts | -| GetAccount | [GetAccountRequest](#getaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Gets an account | -| CreateAccount | [CreateAccountRequest](#createaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Creates an account | -| UpdateAccount | [UpdateAccountRequest](#updateaccountrequest) | [.ocis.messages.accounts.v1.Account](../../../messages/accounts/v1/grpc.md#account) | Updates an account | -| DeleteAccount | [DeleteAccountRequest](#deleteaccountrequest) | [.google.protobuf.Empty](#googleprotobufempty) | Deletes an account | - -### GroupsService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListGroups | [ListGroupsRequest](#listgroupsrequest) | [ListGroupsResponse](#listgroupsresponse) | Lists groups | -| GetGroup | [GetGroupRequest](#getgrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Gets an groups | -| CreateGroup | [CreateGroupRequest](#creategrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Creates a group | -| UpdateGroup | [UpdateGroupRequest](#updategrouprequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | Updates a group | -| DeleteGroup | [DeleteGroupRequest](#deletegrouprequest) | [.google.protobuf.Empty](#googleprotobufempty) | Deletes a group | -| AddMember | [AddMemberRequest](#addmemberrequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http | -| RemoveMember | [RemoveMemberRequest](#removememberrequest) | [.ocis.messages.accounts.v1.Group](../../../messages/accounts/v1/grpc.md#group) | group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 | -| ListMembers | [ListMembersRequest](#listmembersrequest) | [ListMembersResponse](#listmembersresponse) | group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 | - -### IndexService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| RebuildIndex | [RebuildIndexRequest](#rebuildindexrequest) | [RebuildIndexResponse](#rebuildindexresponse) | | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/services/settings/v1/grpc.md b/protogen/docs/extensions/ocis/services/settings/v1/grpc.md deleted file mode 100644 index 7f83d3a8c5a..00000000000 --- a/protogen/docs/extensions/ocis/services/settings/v1/grpc.md +++ /dev/null @@ -1,286 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/services/settings/v1/settings.proto - -### AddSettingToBundleRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle_id | [string](#string) | | | -| setting | [ocis.messages.settings.v1.Setting](../../../messages/settings/v1/grpc.md#setting) | | | - -### AddSettingToBundleResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| setting | [ocis.messages.settings.v1.Setting](../../../messages/settings/v1/grpc.md#setting) | | | - -### AssignRoleToUserRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| account_uuid | [string](#string) | | | -| role_id | [string](#string) | | the role_id is a bundle_id internally | - -### AssignRoleToUserResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| assignment | [ocis.messages.settings.v1.UserRoleAssignment](../../../messages/settings/v1/grpc.md#userroleassignment) | | | - -### GetBundleRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle_id | [string](#string) | | | - -### GetBundleResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | - -### GetPermissionByIDRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| permission_id | [string](#string) | | | - -### GetPermissionByIDResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| permission | [ocis.messages.settings.v1.Permission](../../../messages/settings/v1/grpc.md#permission) | | | - -### GetValueByUniqueIdentifiersRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| account_uuid | [string](#string) | | | -| setting_id | [string](#string) | | | - -### GetValueRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### GetValueResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | | | - -### ListBundlesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle_ids | [string](#string) | repeated | | - -### ListBundlesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundles | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | repeated | | - -### ListPermissionsByResourceRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| resource | [ocis.messages.settings.v1.Resource](../../../messages/settings/v1/grpc.md#resource) | | | - -### ListPermissionsByResourceResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| permissions | [ocis.messages.settings.v1.Permission](../../../messages/settings/v1/grpc.md#permission) | repeated | | - -### ListRoleAssignmentsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| account_uuid | [string](#string) | | | - -### ListRoleAssignmentsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| assignments | [ocis.messages.settings.v1.UserRoleAssignment](../../../messages/settings/v1/grpc.md#userroleassignment) | repeated | | - -### ListValuesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle_id | [string](#string) | | | -| account_uuid | [string](#string) | | | - -### ListValuesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| values | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | repeated | | - -### RemoveRoleFromUserRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | | - -### RemoveSettingFromBundleRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle_id | [string](#string) | | | -| setting_id | [string](#string) | | | - -### SaveBundleRequest - ---- -requests and responses for settings bundles ---- - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | - -### SaveBundleResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| bundle | [ocis.messages.settings.v1.Bundle](../../../messages/settings/v1/grpc.md#bundle) | | | - -### SaveValueRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [ocis.messages.settings.v1.Value](../../../messages/settings/v1/grpc.md#value) | | | - -### SaveValueResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [ocis.messages.settings.v1.ValueWithIdentifier](../../../messages/settings/v1/grpc.md#valuewithidentifier) | | | - - -### BundleService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SaveBundle | [SaveBundleRequest](#savebundlerequest) | [SaveBundleResponse](#savebundleresponse) | | -| GetBundle | [GetBundleRequest](#getbundlerequest) | [GetBundleResponse](#getbundleresponse) | | -| ListBundles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | | -| AddSettingToBundle | [AddSettingToBundleRequest](#addsettingtobundlerequest) | [AddSettingToBundleResponse](#addsettingtobundleresponse) | | -| RemoveSettingFromBundle | [RemoveSettingFromBundleRequest](#removesettingfrombundlerequest) | [.google.protobuf.Empty](#googleprotobufempty) | | - -### PermissionService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListPermissionsByResource | [ListPermissionsByResourceRequest](#listpermissionsbyresourcerequest) | [ListPermissionsByResourceResponse](#listpermissionsbyresourceresponse) | | -| GetPermissionByID | [GetPermissionByIDRequest](#getpermissionbyidrequest) | [GetPermissionByIDResponse](#getpermissionbyidresponse) | | - -### RoleService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListRoles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | | -| ListRoleAssignments | [ListRoleAssignmentsRequest](#listroleassignmentsrequest) | [ListRoleAssignmentsResponse](#listroleassignmentsresponse) | | -| AssignRoleToUser | [AssignRoleToUserRequest](#assignroletouserrequest) | [AssignRoleToUserResponse](#assignroletouserresponse) | | -| RemoveRoleFromUser | [RemoveRoleFromUserRequest](#removerolefromuserrequest) | [.google.protobuf.Empty](#googleprotobufempty) | | - -### ValueService - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| SaveValue | [SaveValueRequest](#savevaluerequest) | [SaveValueResponse](#savevalueresponse) | | -| GetValue | [GetValueRequest](#getvaluerequest) | [GetValueResponse](#getvalueresponse) | | -| ListValues | [ListValuesRequest](#listvaluesrequest) | [ListValuesResponse](#listvaluesresponse) | | -| GetValueByUniqueIdentifiers | [GetValueByUniqueIdentifiersRequest](#getvaluebyuniqueidentifiersrequest) | [GetValueResponse](#getvalueresponse) | | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/services/store/v1/grpc.md b/protogen/docs/extensions/ocis/services/store/v1/grpc.md deleted file mode 100644 index 0c4d61310b5..00000000000 --- a/protogen/docs/extensions/ocis/services/store/v1/grpc.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/services/store/v1/store.proto - -### DatabasesRequest - - - - -### DatabasesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| databases | [string](#string) | repeated | | - -### DeleteRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| options | [ocis.messages.store.v1.DeleteOptions](../../../messages/store/v1/grpc.md#deleteoptions) | | | - -### DeleteResponse - - - - -### ListRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| options | [ocis.messages.store.v1.ListOptions](../../../messages/store/v1/grpc.md#listoptions) | | | - -### ListResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| keys | [string](#string) | repeated | | - -### ReadRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| options | [ocis.messages.store.v1.ReadOptions](../../../messages/store/v1/grpc.md#readoptions) | | | - -### ReadResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| records | [ocis.messages.store.v1.Record](../../../messages/store/v1/grpc.md#record) | repeated | | - -### TablesRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| database | [string](#string) | | | - -### TablesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| tables | [string](#string) | repeated | | - -### WriteRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| record | [ocis.messages.store.v1.Record](../../../messages/store/v1/grpc.md#record) | | | -| options | [ocis.messages.store.v1.WriteOptions](../../../messages/store/v1/grpc.md#writeoptions) | | | - -### WriteResponse - - - - - -### Store - - - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Read | [ReadRequest](#readrequest) | [ReadResponse](#readresponse) | | -| Write | [WriteRequest](#writerequest) | [WriteResponse](#writeresponse) | | -| Delete | [DeleteRequest](#deleterequest) | [DeleteResponse](#deleteresponse) | | -| List | [ListRequest](#listrequest) | [ListResponse](#listresponse) stream | | -| Databases | [DatabasesRequest](#databasesrequest) | [DatabasesResponse](#databasesresponse) | | -| Tables | [TablesRequest](#tablesrequest) | [TablesResponse](#tablesresponse) | | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - diff --git a/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md b/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md deleted file mode 100644 index 1c958300206..00000000000 --- a/protogen/docs/extensions/ocis/services/thumbnails/v1/grpc.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{< toc >}} - - - -## ocis/services/thumbnails/v1/thumbnails.proto - -### GetThumbnailRequest - -A request to retrieve a thumbnail - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| filepath | [string](#string) | | The path to the source image | -| thumbnail_type | [GetThumbnailRequest.ThumbnailType](#getthumbnailrequestthumbnailtype) | | The type to which the thumbnail should get encoded to. | -| width | [int32](#int32) | | The width of the thumbnail | -| height | [int32](#int32) | | The height of the thumbnail | -| webdav_source | [ocis.messages.thumbnails.v1.WebdavSource](../../../messages/thumbnails/v1/grpc.md#webdavsource) | | | -| cs3_source | [ocis.messages.thumbnails.v1.CS3Source](../../../messages/thumbnails/v1/grpc.md#cs3source) | | | - -### GetThumbnailResponse - -The service response - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| thumbnail | [bytes](#bytes) | | The thumbnail as a binary | -| mimetype | [string](#string) | | The mimetype of the thumbnail | - -### GetThumbnailRequest.ThumbnailType - -The file types to which the thumbnail can get encoded to. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| PNG | 0 | Represents PNG type | -| JPG | 1 | Represents JPG type | - -### ThumbnailService - -A Service for handling thumbnail generation - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| GetThumbnail | [GetThumbnailRequest](#getthumbnailrequest) | [GetThumbnailResponse](#getthumbnailresponse) | Generates the thumbnail and returns it. | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -| {{< div id="double" content="double" >}} | | double | double | -| {{< div id="float" content="float" >}} | | float | float | -| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | -| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | -| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int | -| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long | -| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | -| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | -| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | -| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | -| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int | -| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long | -| {{< div id="bool" content="bool" >}} | | bool | boolean | -| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | -| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString | - From 2276ed8d2a9f69694e3b4086f2cded1dfc8071d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 19 Jan 2022 18:51:16 +0100 Subject: [PATCH 15/20] Generate the proto docs in the grpc_apis folder and ignore it from repo --- docs/.gitignore | 1 + protogen/docs/GRPC.tmpl | 16 +++++++++------- protogen/proto/buf.gen.yaml | 5 ++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/.gitignore b/docs/.gitignore index 0ad8bbf7ee5..baf62f09013 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,3 @@ hugo/ +grpc_apis/ mutagen.yml.lock diff --git a/protogen/docs/GRPC.tmpl b/protogen/docs/GRPC.tmpl index ca038092b7c..e96761c8c87 100644 --- a/protogen/docs/GRPC.tmpl +++ b/protogen/docs/GRPC.tmpl @@ -1,9 +1,11 @@ --- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 +{{- $package := (index .Files 0).Package }} +title: "{{ $package }}" +url: /grpc_apis/{{ $package }} +date: {{ now | date "2006-01-02T15:04:05Z07:00" }} weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs +geekdocRepo: https://github.com/owncloud/ocis +geekdocEditPath: edit/master/docs/grpc_apis/{{ $package | replace "." "/" }} geekdocFilePath: grpc.md --- @@ -26,9 +28,9 @@ geekdocFilePath: grpc.md {{ range .Fields -}} {{- $loca := printf "#%s" (.LongType | lower | replace "." "") -}} {{- if and (hasPrefix "ocis." .LongType) (ge (len $filenameParts) 3) -}} - {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} - {{- $fieldDir := dir (.LongType | lower | replace "." "/") -}} - {{- $loca = printf "%s/%s/grpc.md#%s" $rep (substr 5 (len $fieldDir) $fieldDir) (.Type | lower | replace "." "") -}} + {{- $ltypeSpl := .LongType | splitList "." -}} + {{- $ltypePkg := slice $ltypeSpl 0 (sub (len $ltypeSpl) 1) | join "." -}} + {{- $loca = printf "/grpc_apis/%s/#%s" $ltypePkg (.Type | lower) -}} {{- end -}} | {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | {{ end -}} diff --git a/protogen/proto/buf.gen.yaml b/protogen/proto/buf.gen.yaml index e738d48932b..0ab33a71fef 100644 --- a/protogen/proto/buf.gen.yaml +++ b/protogen/proto/buf.gen.yaml @@ -13,8 +13,7 @@ plugins: - paths=source_relative - name: microweb - #path: ../../.bingo/protoc-gen-microweb - path: ../../../protoc-gen-microweb/protoc-gen-microweb + path: ../../.bingo/protoc-gen-microweb out: ../gen/ opt: - paths=source_relative @@ -30,6 +29,6 @@ plugins: - name: doc path: ../../.bingo/protoc-gen-doc - out: ../docs/extensions + out: ../../docs/grpc_apis opt: - ../docs/GRPC.tmpl,grpc.md,source_relative From df1a207a1292c82c872210311beb609c77e2cf9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 20 Jan 2022 11:58:41 +0100 Subject: [PATCH 16/20] Adjust formatting and fix links --- protogen/docs/GRPC.tmpl | 22 +++++++++---------- .../ocis/messages/accounts/v1/accounts.pb.go | 20 ++++++++--------- .../accounts/v1/accounts.swagger.json | 18 +++++++-------- .../ocis/messages/accounts/v1/accounts.proto | 22 ++++++++++--------- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/protogen/docs/GRPC.tmpl b/protogen/docs/GRPC.tmpl index e96761c8c87..5940398adbf 100644 --- a/protogen/docs/GRPC.tmpl +++ b/protogen/docs/GRPC.tmpl @@ -32,14 +32,14 @@ geekdocFilePath: grpc.md {{- $ltypePkg := slice $ltypeSpl 0 (sub (len $ltypeSpl) 1) | join "." -}} {{- $loca = printf "/grpc_apis/%s/#%s" $ltypePkg (.Type | lower) -}} {{- end -}} -| {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | +| {{.Name}} | [{{.LongType}}]({{ $loca }}) | {{.Label}} | {{ .Description | replace "\n" "
" }}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | {{ end -}} {{ end }} {{ if .HasExtensions -}} | Extension | Type | Base | Number | Description | | --------- | ---- | ---- | ------ | ----------- | {{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{ .Description | replace "\n" "
" }}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | {{ end -}} {{ end -}} {{ end -}} @@ -51,7 +51,7 @@ geekdocFilePath: grpc.md | Name | Number | Description | | ---- | ------ | ----------- | {{range .Values -}} -| {{.Name}} | {{.Number}} | {{nobr .Description}} | +| {{.Name}} | {{.Number}} | {{ .Description | replace "\n" "
" }} | {{ end -}} {{ end -}} @@ -61,7 +61,7 @@ geekdocFilePath: grpc.md | Extension | Type | Base | Number | Description | | --------- | ---- | ---- | ------ | ----------- | {{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | +| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{ .Description | replace "\n" "
" }}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | {{ end -}} {{ end -}} {{- range .Services }} @@ -75,16 +75,16 @@ geekdocFilePath: grpc.md {{- $reqLoca := printf "#%s" (.RequestLongType | lower | replace "." "") -}} {{- $respLoca := printf "#%s" (.ResponseLongType | lower | replace "." "") -}} {{- if and (hasPrefix ".ocis." .RequestLongType) (ge (len $filenameParts) 3) }} - {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} - {{- $reqDir := dir (.RequestLongType | lower | replace "." "/") -}} - {{- $reqLoca = printf "%s/%s/grpc.md#%s" $rep (substr 6 (len $reqDir) $reqDir) (.RequestType | lower | replace "." "") -}} + {{- $ltypeSpl := .RequestLongType | substr 1 -1 | splitList "." -}} + {{- $ltypePkg := slice $ltypeSpl 0 (sub (len $ltypeSpl) 1) | join "." -}} + {{- $reqLoca = printf "/grpc_apis/%s/#%s" $ltypePkg (.RequestType | lower) -}} {{- end -}} {{- if and (hasPrefix ".ocis." .ResponseLongType) (ge (len $filenameParts) 3) }} - {{- $rep := regexReplaceAll "[^/]+" (slice $filenameParts 1 (sub (len $filenameParts) 1) | join "/") ".." -}} - {{- $respDir := dir (.ResponseLongType | lower | replace "." "/") -}} - {{- $respLoca = printf "%s/%s/grpc.md#%s" $rep (substr 6 (len $respDir) $respDir) (.ResponseType | lower | replace "." "") -}} + {{- $ltypeSpl := .ResponseLongType | substr 1 -1 | splitList "." -}} + {{- $ltypePkg := slice $ltypeSpl 0 (sub (len $ltypeSpl) 1) | join "." -}} + {{- $respLoca = printf "/grpc_apis/%s/#%s" $ltypePkg (.ResponseType | lower) -}} {{- end -}} -| {{.Name}} | [{{.RequestLongType}}]({{ $reqLoca }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}]({{ $respLoca }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | +| {{.Name}} | [{{.RequestLongType}}]({{ $reqLoca }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}]({{ $respLoca }}){{if .ResponseStreaming}} stream{{end}} | {{ .Description | replace "\n" "
" }} | {{ end -}} {{ end -}} {{ end }} diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go index d55cb8b7739..ac50fa2e972 100644 --- a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go +++ b/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go @@ -30,13 +30,13 @@ type Account struct { // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. + // `true` if the account is enabled; otherwise, `false`. This property is required when a user is created. Supports $filter. AccountEnabled bool `protobuf:"varint,2,opt,name=account_enabled,json=accountEnabled,proto3" json:"account_enabled,omitempty"` // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. // You could give printers or machines with a sync client resource accounts as well. // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. + // `true` if the user is a resource account; otherwise, `false`. Null value should be considered false. IsResourceAccount bool `protobuf:"varint,3,opt,name=is_resource_account,json=isResourceAccount,proto3" json:"is_resource_account,omitempty"` // Indicates whether the account was created as // - a regular school or work account ("" / emptystring), @@ -57,7 +57,6 @@ type Account struct { // The username // posixaccount MUST uid PreferredName string `protobuf:"bytes,7,opt,name=preferred_name,json=preferredName,proto3" json:"preferred_name,omitempty"` - // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users // used for exposing the user using ldap // posixaccount MUST uidnumber UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"` @@ -83,8 +82,8 @@ type Account struct { CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` // The date and time the user was deleted. Returned only on $select. DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; + // `true` if this object is synced from an on-premises directory; + // `false` if this object was originally synced from an on-premises directory but is no longer synced; // null if this object has never been synced from an on-premises directory (default). Read-only OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` // This property is used to associate an on-premises LDAP user to the oCIS account object. @@ -378,7 +377,7 @@ type Identities struct { Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address + // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) `issuerAssignedId` must be a valid email address // * `userName`, issuer_assigned_id must be a valid local part of an email address // Supports $filter. 512 character limit. IssuerAssignedId string `protobuf:"bytes,3,opt,name=issuer_assigned_id,json=issuerAssignedId,proto3" json:"issuer_assigned_id,omitempty"` @@ -452,9 +451,9 @@ type PasswordProfile struct { //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. // “DisablePasswordExpiration” can also be specified. PasswordPolicies []string `protobuf:"bytes,3,rep,name=password_policies,json=passwordPolicies,proto3" json:"password_policies,omitempty"` - // *true* if the user must change her password on the next login; otherwise false. + // `true` if the user must change her password on the next login; otherwise false. ForceChangePasswordNextSignIn bool `protobuf:"varint,4,opt,name=force_change_password_next_sign_in,json=forceChangePasswordNextSignIn,proto3" json:"force_change_password_next_sign_in,omitempty"` - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + // If `true`, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. ForceChangePasswordNextSignInWithMfa bool `protobuf:"varint,5,opt,name=force_change_password_next_sign_in_with_mfa,json=forceChangePasswordNextSignInWithMfa,proto3" json:"force_change_password_next_sign_in_with_mfa,omitempty"` } @@ -538,7 +537,6 @@ type Group struct { // groupofnames MUST cn DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // groupofnames MUST/MAY member // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. - // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later Members []*Account `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` // groupofnames MAY businessCategory // groupofnames MAY o @@ -568,8 +566,8 @@ type Group struct { // Visibility can be set only when a group is created; it is not editable. // Returned by default. Visibility string `protobuf:"bytes,11,opt,name=visibility,proto3" json:"visibility,omitempty"` - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; + // `true` if this group is synced from an on-premises directory; + // `false` if this group was originally synced from an on-premises directory but is no longer synced; // null if this object has never been synced from an on-premises directory (default). // Returned by default. Read-only. Supports $filter. OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json index 37c4e9bed26..67365de3ffc 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -590,11 +590,11 @@ }, "accountEnabled": { "type": "boolean", - "description": "*true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter." + "description": "`true` if the account is enabled; otherwise, `false`. This property is required when a user is created. Supports $filter." }, "isResourceAccount": { "type": "boolean", - "description": "A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general.\nIn Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number.\nYou could give printers or machines with a sync client resource accounts as well.\nA resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019.\n*true* if the user is a resource account; otherwise, *false*. Null value should be considered false." + "description": "A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general.\nIn Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number.\nYou could give printers or machines with a sync client resource accounts as well.\nA resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019.\n`true` if the user is a resource account; otherwise, `false`. Null value should be considered false." }, "creationType": { "type": "string", @@ -618,7 +618,7 @@ "uidNumber": { "type": "string", "format": "int64", - "title": "TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users\nused for exposing the user using ldap\nposixaccount MUST uidnumber" + "title": "used for exposing the user using ldap\nposixaccount MUST uidnumber" }, "gidNumber": { "type": "string", @@ -656,7 +656,7 @@ }, "onPremisesSyncEnabled": { "type": "boolean", - "title": "*true* if this object is synced from an on-premises directory;\n*false* if this object was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default). Read-only" + "title": "`true` if this object is synced from an on-premises directory;\n`false` if this object was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default). Read-only" }, "onPremisesImmutableId": { "type": "string", @@ -782,7 +782,7 @@ "items": { "$ref": "#/definitions/v1Account" }, - "title": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable.\nTODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later" + "description": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable." }, "owners": { "type": "array", @@ -825,7 +825,7 @@ }, "onPremisesSyncEnabled": { "type": "boolean", - "description": "*true* if this group is synced from an on-premises directory;\n*false* if this group was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default).\nReturned by default. Read-only. Supports $filter." + "description": "`true` if this group is synced from an on-premises directory;\n`false` if this group was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default).\nReturned by default. Read-only. Supports $filter." }, "onPremisesImmutableId": { "type": "string", @@ -877,7 +877,7 @@ }, "issuerAssignedId": { "type": "string", - "description": "Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).\nWhen *signInType* is set to:\n* `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address\n* `userName`, issuer_assigned_id must be a valid local part of an email address\nSupports $filter. 512 character limit." + "description": "Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).\nWhen *signInType* is set to:\n* `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) `issuerAssignedId` must be a valid email address\n* `userName`, issuer_assigned_id must be a valid local part of an email address\nSupports $filter. 512 character limit." } }, "description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames." @@ -1019,11 +1019,11 @@ }, "forceChangePasswordNextSignIn": { "type": "boolean", - "description": "*true* if the user must change her password on the next login; otherwise false." + "description": "`true` if the user must change her password on the next login; otherwise false." }, "forceChangePasswordNextSignInWithMfa": { "type": "boolean", - "description": "If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false." + "description": "If `true`, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false." } } }, diff --git a/protogen/proto/ocis/messages/accounts/v1/accounts.proto b/protogen/proto/ocis/messages/accounts/v1/accounts.proto index 106b19a6a54..ba4862ba1d1 100644 --- a/protogen/proto/ocis/messages/accounts/v1/accounts.proto +++ b/protogen/proto/ocis/messages/accounts/v1/accounts.proto @@ -14,14 +14,14 @@ message Account { // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. string id = 1; - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. + // `true` if the account is enabled; otherwise, `false`. This property is required when a user is created. Supports $filter. bool account_enabled = 2; // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. // You could give printers or machines with a sync client resource accounts as well. // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. + // `true` if the user is a resource account; otherwise, `false`. Null value should be considered false. bool is_resource_account = 3; // Indicates whether the account was created as @@ -50,6 +50,7 @@ message Account { string preferred_name = 7; // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users + // used for exposing the user using ldap // posixaccount MUST uidnumber int64 uid_number = 8; @@ -100,8 +101,8 @@ message Account { // properties for sync - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; + // `true` if this object is synced from an on-premises directory; + // `false` if this object was originally synced from an on-premises directory but is no longer synced; // null if this object has never been synced from an on-premises directory (default). Read-only bool on_premises_sync_enabled = 20; @@ -186,7 +187,7 @@ message Identities { // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address + // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) `issuerAssignedId` must be a valid email address // * `userName`, issuer_assigned_id must be a valid local part of an email address // Supports $filter. 512 character limit. string issuer_assigned_id = 3; @@ -205,10 +206,10 @@ message PasswordProfile { // “DisablePasswordExpiration” can also be specified. repeated string password_policies = 3; - // *true* if the user must change her password on the next login; otherwise false. + // `true` if the user must change her password on the next login; otherwise false. bool force_change_password_next_sign_in = 4; - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + // If `true`, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. bool force_change_password_next_sign_in_with_mfa = 5; } @@ -226,8 +227,9 @@ message Group { string display_name = 2; // groupofnames MUST/MAY member - // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later + + // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. repeated Account members = 3; // groupofnames MAY businessCategory @@ -279,8 +281,8 @@ message Group { // properties for sync - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; + // `true` if this group is synced from an on-premises directory; + // `false` if this group was originally synced from an on-premises directory but is no longer synced; // null if this object has never been synced from an on-premises directory (default). // Returned by default. Read-only. Supports $filter. bool on_premises_sync_enabled = 20; From 83b4bf9bcfeac774de1af74ce454e89ffddfacf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 20 Jan 2022 13:15:59 +0100 Subject: [PATCH 17/20] Remove old configuration templates --- accounts/templates/GRPC.tmpl | 75 ------------------------------ protogen/docs/CONFIGURATION.tmpl | 78 -------------------------------- settings/templates/GRPC.tmpl | 75 ------------------------------ store/templates/GRPC.tmpl | 75 ------------------------------ thumbnails/templates/GRPC.tmpl | 75 ------------------------------ 5 files changed, 378 deletions(-) delete mode 100644 accounts/templates/GRPC.tmpl delete mode 100644 protogen/docs/CONFIGURATION.tmpl delete mode 100644 settings/templates/GRPC.tmpl delete mode 100644 store/templates/GRPC.tmpl delete mode 100644 thumbnails/templates/GRPC.tmpl diff --git a/accounts/templates/GRPC.tmpl b/accounts/templates/GRPC.tmpl deleted file mode 100644 index 545ab202ded..00000000000 --- a/accounts/templates/GRPC.tmpl +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{`{{< toc >}}`}} - -{{ range .Files -}} -## {{ .Name }} - -{{ .Description }} -{{- range .Messages -}} -{{- /* remove newline */}}### {{ .LongName }} - -{{ .Description }} - -{{ if .HasFields -}} -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -{{ range .Fields -}} -| {{.Name}} | [{{.LongType}}](#{{.LongType | lower | replace "." "" }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | -{{ end -}} -{{ end }} -{{ if .HasExtensions -}} -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{ end -}} -{{ end -}} -{{ end -}} -{{- range .Enums -}} -### {{ .LongName }} - -{{ .Description }} - -| Name | Number | Description | -| ---- | ------ | ----------- | -{{range .Values -}} -| {{.Name}} | {{.Number}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} - -{{ if .HasExtensions }} - -### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | -{{ end -}} -{{ end -}} -{{- range .Services }} -### {{ .Name }} - -{{ .Description }} - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -{{ range .Methods -}} -| {{.Name}} | [{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." "" }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." "" }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} -{{ end }} -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -{{ range .Scalars -}} -| {{`{{< div id="`}}{{.ProtoType}}{{`" content="`}}{{.ProtoType}}{{`" >}}`}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | -{{ end }} \ No newline at end of file diff --git a/protogen/docs/CONFIGURATION.tmpl b/protogen/docs/CONFIGURATION.tmpl deleted file mode 100644 index c180d7a56f7..00000000000 --- a/protogen/docs/CONFIGURATION.tmpl +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "Configuration" -date: "{{ date "2006-01-02T15:04:05-0700" now }}" -weight: 20 -geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/accounts/templates -geekdocFilePath: CONFIGURATION.tmpl ---- -{{- define "options"}} -{{ $fnNames := (last . ).Flags -}} -{{ range $opt := first . }} -{{ range $fnName := $fnNames }}{{ with list $fnName $opt -}} -{{ $o := last . -}} -{{ if eq $o.FnName $fnName -}} --{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }} -: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }} - -{{ end -}} -{{ end -}} -{{ end -}} -{{ end -}} -{{ end }} - -{{`{{< toc >}}`}} - -## Configuration - -### Configuration using config files - -Out of the box extensions will attempt to read configuration details from: - -```console -/etc/ocis -$HOME/.ocis -./config -``` - -For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-accounts reads `accounts.json | yaml | toml ...`*. - -So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/accounts/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. - -### Environment variables - -If you prefer to configure the service with environment variables you can see the available variables below. - -If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given. - -### Command-line flags - -If you prefer to configure the service with command-line flags you can see the available variables below. Command line flags are only working when calling the subcommand directly. - -{{ $options := .Options -}} -{{ range $com := .Commands }}{{ with (list $options $com) -}} -{{ $c := last . -}} -{{ if eq $c.Name "accounts" -}} -## Root Command - -{{ $c.Usage }} - -Usage: `accounts [global options] command [command options] [arguments...]` -{{ template "options" . -}} -## Sub Commands - -{{ end -}} -{{ end -}} -{{ end -}} -{{- range $com := .Commands }}{{ with (list $options $com) -}} -{{- $c := last . }} -{{- if ne $c.Name "accounts" -}} -### accounts {{ $c.Name }} - -{{ $c.Usage }} - -Usage: `accounts {{ $c.Name }} [command options] [arguments...]` -{{ template "options" . }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/settings/templates/GRPC.tmpl b/settings/templates/GRPC.tmpl deleted file mode 100644 index 545ab202ded..00000000000 --- a/settings/templates/GRPC.tmpl +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{`{{< toc >}}`}} - -{{ range .Files -}} -## {{ .Name }} - -{{ .Description }} -{{- range .Messages -}} -{{- /* remove newline */}}### {{ .LongName }} - -{{ .Description }} - -{{ if .HasFields -}} -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -{{ range .Fields -}} -| {{.Name}} | [{{.LongType}}](#{{.LongType | lower | replace "." "" }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | -{{ end -}} -{{ end }} -{{ if .HasExtensions -}} -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{ end -}} -{{ end -}} -{{ end -}} -{{- range .Enums -}} -### {{ .LongName }} - -{{ .Description }} - -| Name | Number | Description | -| ---- | ------ | ----------- | -{{range .Values -}} -| {{.Name}} | {{.Number}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} - -{{ if .HasExtensions }} - -### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | -{{ end -}} -{{ end -}} -{{- range .Services }} -### {{ .Name }} - -{{ .Description }} - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -{{ range .Methods -}} -| {{.Name}} | [{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." "" }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." "" }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} -{{ end }} -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -{{ range .Scalars -}} -| {{`{{< div id="`}}{{.ProtoType}}{{`" content="`}}{{.ProtoType}}{{`" >}}`}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | -{{ end }} \ No newline at end of file diff --git a/store/templates/GRPC.tmpl b/store/templates/GRPC.tmpl deleted file mode 100644 index 545ab202ded..00000000000 --- a/store/templates/GRPC.tmpl +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{`{{< toc >}}`}} - -{{ range .Files -}} -## {{ .Name }} - -{{ .Description }} -{{- range .Messages -}} -{{- /* remove newline */}}### {{ .LongName }} - -{{ .Description }} - -{{ if .HasFields -}} -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -{{ range .Fields -}} -| {{.Name}} | [{{.LongType}}](#{{.LongType | lower | replace "." "" }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | -{{ end -}} -{{ end }} -{{ if .HasExtensions -}} -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{ end -}} -{{ end -}} -{{ end -}} -{{- range .Enums -}} -### {{ .LongName }} - -{{ .Description }} - -| Name | Number | Description | -| ---- | ------ | ----------- | -{{range .Values -}} -| {{.Name}} | {{.Number}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} - -{{ if .HasExtensions }} - -### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | -{{ end -}} -{{ end -}} -{{- range .Services }} -### {{ .Name }} - -{{ .Description }} - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -{{ range .Methods -}} -| {{.Name}} | [{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." "" }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." "" }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} -{{ end }} -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -{{ range .Scalars -}} -| {{`{{< div id="`}}{{.ProtoType}}{{`" content="`}}{{.ProtoType}}{{`" >}}`}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | -{{ end }} \ No newline at end of file diff --git a/thumbnails/templates/GRPC.tmpl b/thumbnails/templates/GRPC.tmpl deleted file mode 100644 index 545ab202ded..00000000000 --- a/thumbnails/templates/GRPC.tmpl +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: "GRPC API" -date: 2018-05-02T00:00:00+00:00 -weight: 50 -geekdocRepo: https://github.com/owncloud/ocis-thumbnails -geekdocEditPath: edit/master/docs -geekdocFilePath: grpc.md ---- - -{{`{{< toc >}}`}} - -{{ range .Files -}} -## {{ .Name }} - -{{ .Description }} -{{- range .Messages -}} -{{- /* remove newline */}}### {{ .LongName }} - -{{ .Description }} - -{{ if .HasFields -}} -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -{{ range .Fields -}} -| {{.Name}} | [{{.LongType}}](#{{.LongType | lower | replace "." "" }}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end }} | -{{ end -}} -{{ end }} -{{ if .HasExtensions -}} -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{ end -}} -{{ end -}} -{{ end -}} -{{- range .Enums -}} -### {{ .LongName }} - -{{ .Description }} - -| Name | Number | Description | -| ---- | ------ | ----------- | -{{range .Values -}} -| {{.Name}} | {{.Number}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} - -{{ if .HasExtensions }} - -### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{ range .Extensions -}} -| {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | -{{ end -}} -{{ end -}} -{{- range .Services }} -### {{ .Name }} - -{{ .Description }} - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -{{ range .Methods -}} -| {{.Name}} | [{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." "" }}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." "" }}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | -{{ end -}} -{{ end -}} -{{ end }} -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | -| ----------- | ----- | --- | ---- | -{{ range .Scalars -}} -| {{`{{< div id="`}}{{.ProtoType}}{{`" content="`}}{{.ProtoType}}{{`" >}}`}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | -{{ end }} \ No newline at end of file From 4736c8825218eeeef02a8737d9bc0f31c8c76daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Fri, 21 Jan 2022 14:29:57 +0100 Subject: [PATCH 18/20] Restore old makefile and check custom lock file before the generation --- .make/protobuf.mk | 24 ++++++++++++++++++++++++ Makefile | 21 ++++----------------- accounts/Makefile | 6 ++++++ settings/Makefile | 6 ++++++ store/Makefile | 6 ++++++ thumbnails/Makefile | 6 ++++++ 6 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 .make/protobuf.mk diff --git a/.make/protobuf.mk b/.make/protobuf.mk new file mode 100644 index 00000000000..52204ed97bd --- /dev/null +++ b/.make/protobuf.mk @@ -0,0 +1,24 @@ +SHA1_LOCK_FILE := $(abspath $(CURDIR)/../protogen/buf.sha1.lock) + +# bingo creates symlinks from the -l option in GOBIN, from where +# we can easily use it with buf. To have the symlinks inside this +# repo and on a known location, we set GOBIN to .bingo in the root +# of the repository (therefore we need to cd ..) +.PHONY: protoc-deps +protoc-deps: $(BINGO) + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc + +.PHONY: buf-generate +buf-generate: $(BUF) protoc-deps $(SHA1_LOCK_FILE) + @find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > buf.sha1.lock.tmp + @cmp $(SHA1_LOCK_FILE) buf.sha1.lock.tmp --quiet || $(MAKE) -B $(SHA1_LOCK_FILE) + @rm -f buf.sha1.lock.tmp + +$(SHA1_LOCK_FILE): + @echo "generating protobuf content" + cd ../protogen/proto && $(BUF) generate + find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE) diff --git a/Makefile b/Makefile index 6932cff7861..de9c6924ba6 100644 --- a/Makefile +++ b/Makefile @@ -163,24 +163,11 @@ go-coverage: echo -n "% coverage $$mod: "; $(MAKE) --no-print-directory -C $$mod go-coverage; \ done -# bingo creates symlinks from the -l option in GOBIN, from where -# we can easily use it with buf. To have the symlinks inside this -# repo and on a known location, we set GOBIN to .bingo in the root -# of the repository (therefore we need to cd ..) -.PHONY: protoc-deps -protoc-deps: $(BINGO) - @GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go - @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 - @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb - @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 - @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc - -.PHONY: buf-generate -buf-generate: $(BUF) protoc-deps - cd protogen/proto && $(BUF) generate - .PHONY: protobuf -protobuf: buf-generate +protobuf: + @for mod in $(OCIS_MODULES); do \ + echo -n "% protobuf $$mod: "; $(MAKE) --no-print-directory -C $$mod protobuf; \ + done .PHONY: bingo-update bingo-update: $(BINGO) diff --git a/accounts/Makefile b/accounts/Makefile index 9b0678468fc..456de57a689 100644 --- a/accounts/Makefile +++ b/accounts/Makefile @@ -47,3 +47,9 @@ yarn-build: node_modules .PHONY: node_modules node_modules: yarn install --immutable + +############ protobuf ############ +include ../.make/protobuf.mk + +.PHONY: protobuf +protobuf: buf-generate diff --git a/settings/Makefile b/settings/Makefile index c838ab93a3b..445db94d4cf 100644 --- a/settings/Makefile +++ b/settings/Makefile @@ -48,3 +48,9 @@ yarn-build: node_modules .PHONY: node_modules node_modules: yarn install --immutable + +############ protobuf ############ +include ../.make/protobuf.mk + +.PHONY: protobuf +protobuf: buf-generate diff --git a/store/Makefile b/store/Makefile index 8fbe07b3059..9c9323a4b28 100644 --- a/store/Makefile +++ b/store/Makefile @@ -30,3 +30,9 @@ ci-go-generate: protobuf # CI runs ci-node-generate automatically before this ta .PHONY: ci-node-generate ci-node-generate: + +############ protobuf ############ +include ../.make/protobuf.mk + +.PHONY: protobuf +protobuf: buf-generate diff --git a/thumbnails/Makefile b/thumbnails/Makefile index a083f93166c..5ae6d2740c1 100644 --- a/thumbnails/Makefile +++ b/thumbnails/Makefile @@ -29,3 +29,9 @@ ci-go-generate: protobuf # CI runs ci-node-generate automatically before this ta .PHONY: ci-node-generate ci-node-generate: + +############ protobuf ############ +include ../.make/protobuf.mk + +.PHONY: protobuf +protobuf: buf-generate From 8ab2034083464654572aa940e9518064d118b57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Fri, 28 Jan 2022 15:25:25 +0100 Subject: [PATCH 19/20] Review changes --- .gitignore | 3 +++ docs/grpc_apis/_index.md | 3 +++ protogen/docs/GRPC.tmpl | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 docs/grpc_apis/_index.md diff --git a/.gitignore b/.gitignore index 818d3a0f8e3..7a560149c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ vendor-bin/**/composer.lock **/l10n/locale **/l10n/template.pot + +# protogen autogenerated +protogen/buf.sha1.lock diff --git a/docs/grpc_apis/_index.md b/docs/grpc_apis/_index.md new file mode 100644 index 00000000000..f6588c8d7f9 --- /dev/null +++ b/docs/grpc_apis/_index.md @@ -0,0 +1,3 @@ +--- +title: GRPC apis +--- diff --git a/protogen/docs/GRPC.tmpl b/protogen/docs/GRPC.tmpl index 5940398adbf..e96134d9dc4 100644 --- a/protogen/docs/GRPC.tmpl +++ b/protogen/docs/GRPC.tmpl @@ -5,8 +5,6 @@ url: /grpc_apis/{{ $package }} date: {{ now | date "2006-01-02T15:04:05Z07:00" }} weight: 50 geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs/grpc_apis/{{ $package | replace "." "/" }} -geekdocFilePath: grpc.md --- {{`{{< toc >}}`}} From 7d8e334537d9b2e98d900f0f17b4f26e6e9328be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Mon, 31 Jan 2022 12:17:56 +0100 Subject: [PATCH 20/20] Revert v1 to v0 --- accounts/pkg/command/add_account.go | 4 +- accounts/pkg/command/inspect_account.go | 4 +- accounts/pkg/command/list_accounts.go | 4 +- accounts/pkg/command/rebuild_index.go | 2 +- accounts/pkg/command/remove_account.go | 2 +- accounts/pkg/command/update_account.go | 4 +- accounts/pkg/flagset/flagset.go | 2 +- accounts/pkg/server/grpc/server.go | 2 +- accounts/pkg/server/http/server.go | 2 +- accounts/pkg/service/v0/accounts.go | 6 +- .../service/v0/accounts_permission_test.go | 8 +- accounts/pkg/service/v0/groups.go | 4 +- accounts/pkg/service/v0/index.go | 4 +- accounts/pkg/service/v0/option.go | 2 +- accounts/pkg/service/v0/permissions.go | 4 +- accounts/pkg/service/v0/service.go | 4 +- accounts/pkg/storage/cs3.go | 2 +- accounts/pkg/storage/cs3_test.go | 2 +- accounts/pkg/storage/disk.go | 2 +- accounts/pkg/storage/repo.go | 2 +- glauth/pkg/command/server.go | 2 +- glauth/pkg/server/glauth/ocis.go | 4 +- glauth/pkg/server/glauth/option.go | 2 +- graph/pkg/service/v0/drives.go | 2 +- .../indexer/index/disk/autoincrement_test.go | 2 +- ocis-pkg/roles/cache.go | 2 +- ocis-pkg/roles/cache_test.go | 2 +- ocis-pkg/roles/manager.go | 4 +- ocis-pkg/roles/option.go | 2 +- ocs/pkg/server/http/svc_test.go | 8 +- ocs/pkg/service/v0/groups.go | 4 +- ocs/pkg/service/v0/option.go | 2 +- ocs/pkg/service/v0/service.go | 4 +- ocs/pkg/service/v0/users.go | 8 +- .../accounts/{v1 => v0}/accounts.pb.go | 154 ++--- .../accounts/{v1 => v0}/accounts.pb.micro.go | 4 +- .../accounts/{v1 => v0}/accounts.pb.web.go | 4 +- .../accounts/{v1 => v0}/accounts.swagger.json | 2 +- .../settings/{v1 => v0}/settings.pb.go | 354 +++++------ .../settings/{v1 => v0}/settings.pb.micro.go | 4 +- .../settings/{v1 => v0}/settings.pb.web.go | 4 +- .../settings/{v1 => v0}/settings.swagger.json | 2 +- .../messages/store/{v1 => v0}/store.pb.go | 140 ++--- .../store/{v1 => v0}/store.pb.micro.go | 4 +- .../store/{v1 => v0}/store.swagger.json | 2 +- .../thumbnails/{v1 => v0}/thumbnails.pb.go | 74 +-- .../{v1 => v0}/thumbnails.pb.micro.go | 4 +- .../{v1 => v0}/thumbnails.swagger.json | 2 +- .../accounts/{v1 => v0}/accounts.mock.go | 4 +- .../accounts/{v1 => v0}/accounts.pb.go | 420 ++++++------- .../accounts/{v1 => v0}/accounts.pb.micro.go | 102 ++-- .../accounts/{v1 => v0}/accounts.pb.web.go | 22 +- .../accounts/{v1 => v0}/accounts.swagger.json | 114 ++-- .../settings/{v1 => v0}/settings.mock.go | 2 +- .../settings/{v1 => v0}/settings.pb.go | 562 +++++++++--------- .../settings/{v1 => v0}/settings.pb.micro.go | 6 +- .../settings/{v1 => v0}/settings.pb.web.go | 4 +- .../settings/{v1 => v0}/settings.swagger.json | 214 +++---- .../services/store/{v1 => v0}/store.pb.go | 290 ++++----- .../store/{v1 => v0}/store.pb.micro.go | 6 +- .../store/{v1 => v0}/store.swagger.json | 30 +- .../thumbnails/{v1 => v0}/thumbnails.pb.go | 132 ++-- .../{v1 => v0}/thumbnails.pb.micro.go | 6 +- .../{v1 => v0}/thumbnails.swagger.json | 6 +- protogen/proto/buf.gen.yaml | 8 +- .../accounts/{v1 => v0}/accounts.proto | 4 +- .../settings/{v1 => v0}/settings.proto | 4 +- .../messages/store/{v1 => v0}/store.proto | 4 +- .../thumbnails/{v1 => v0}/thumbnails.proto | 4 +- .../accounts/{v1 => v0}/accounts.proto | 36 +- .../settings/{v1 => v0}/settings.proto | 36 +- .../services/store/{v1 => v0}/store.proto | 20 +- .../thumbnails/{v1 => v0}/thumbnails.proto | 10 +- proxy/pkg/command/server.go | 6 +- proxy/pkg/middleware/options.go | 6 +- proxy/pkg/middleware/signed_url_auth.go | 4 +- proxy/pkg/proxy/policy/selector.go | 2 +- proxy/pkg/proxy/policy/selector_test.go | 4 +- proxy/pkg/user/backend/accounts.go | 6 +- proxy/pkg/user/backend/accounts_test.go | 8 +- proxy/pkg/user/backend/backend.go | 2 +- proxy/pkg/user/backend/cs3.go | 2 +- settings/pkg/server/grpc/server.go | 2 +- settings/pkg/server/http/server.go | 2 +- settings/pkg/service/v0/permissions.go | 2 +- settings/pkg/service/v0/service.go | 4 +- settings/pkg/service/v0/settings.go | 4 +- settings/pkg/service/v0/validator.go | 4 +- settings/pkg/settings/settings.go | 2 +- settings/pkg/store/filesystem/assignments.go | 2 +- .../pkg/store/filesystem/assignments_test.go | 2 +- settings/pkg/store/filesystem/bundles.go | 2 +- settings/pkg/store/filesystem/bundles_test.go | 2 +- settings/pkg/store/filesystem/permissions.go | 2 +- settings/pkg/store/filesystem/values.go | 2 +- settings/pkg/store/filesystem/values_test.go | 2 +- settings/pkg/util/resource_helper.go | 2 +- settings/pkg/util/resource_helper_test.go | 2 +- store/pkg/server/grpc/server.go | 2 +- store/pkg/service/v0/service.go | 4 +- thumbnails/pkg/server/grpc/server.go | 2 +- thumbnails/pkg/service/v0/instrument.go | 2 +- thumbnails/pkg/service/v0/logging.go | 2 +- thumbnails/pkg/service/v0/service.go | 2 +- thumbnails/pkg/service/v0/tracing.go | 2 +- webdav/pkg/service/v0/service.go | 4 +- 106 files changed, 1506 insertions(+), 1506 deletions(-) rename protogen/gen/ocis/messages/accounts/{v1 => v0}/accounts.pb.go (92%) rename protogen/gen/ocis/messages/accounts/{v1 => v0}/accounts.pb.micro.go (83%) rename protogen/gen/ocis/messages/accounts/{v1 => v0}/accounts.pb.web.go (99%) rename protogen/gen/ocis/messages/accounts/{v1 => v0}/accounts.swagger.json (92%) rename protogen/gen/ocis/messages/settings/{v1 => v0}/settings.pb.go (83%) rename protogen/gen/ocis/messages/settings/{v1 => v0}/settings.pb.micro.go (80%) rename protogen/gen/ocis/messages/settings/{v1 => v0}/settings.pb.web.go (99%) rename protogen/gen/ocis/messages/settings/{v1 => v0}/settings.swagger.json (92%) rename protogen/gen/ocis/messages/store/{v1 => v0}/store.pb.go (81%) rename protogen/gen/ocis/messages/store/{v1 => v0}/store.pb.micro.go (82%) rename protogen/gen/ocis/messages/store/{v1 => v0}/store.swagger.json (93%) rename protogen/gen/ocis/messages/thumbnails/{v1 => v0}/thumbnails.pb.go (76%) rename protogen/gen/ocis/messages/thumbnails/{v1 => v0}/thumbnails.pb.micro.go (79%) rename protogen/gen/ocis/messages/thumbnails/{v1 => v0}/thumbnails.swagger.json (92%) rename protogen/gen/ocis/services/accounts/{v1 => v0}/accounts.mock.go (99%) rename protogen/gen/ocis/services/accounts/{v1 => v0}/accounts.pb.go (80%) rename protogen/gen/ocis/services/accounts/{v1 => v0}/accounts.pb.micro.go (88%) rename protogen/gen/ocis/services/accounts/{v1 => v0}/accounts.pb.web.go (98%) rename protogen/gen/ocis/services/accounts/{v1 => v0}/accounts.swagger.json (94%) rename protogen/gen/ocis/services/settings/{v1 => v0}/settings.mock.go (99%) rename protogen/gen/ocis/services/settings/{v1 => v0}/settings.pb.go (77%) rename protogen/gen/ocis/services/settings/{v1 => v0}/settings.pb.micro.go (99%) rename protogen/gen/ocis/services/settings/{v1 => v0}/settings.pb.web.go (99%) rename protogen/gen/ocis/services/settings/{v1 => v0}/settings.swagger.json (81%) rename protogen/gen/ocis/services/store/{v1 => v0}/store.pb.go (73%) rename protogen/gen/ocis/services/store/{v1 => v0}/store.pb.micro.go (98%) rename protogen/gen/ocis/services/store/{v1 => v0}/store.swagger.json (91%) rename protogen/gen/ocis/services/thumbnails/{v1 => v0}/thumbnails.pb.go (77%) rename protogen/gen/ocis/services/thumbnails/{v1 => v0}/thumbnails.pb.micro.go (97%) rename protogen/gen/ocis/services/thumbnails/{v1 => v0}/thumbnails.swagger.json (97%) rename protogen/proto/ocis/messages/accounts/{v1 => v0}/accounts.proto (99%) rename protogen/proto/ocis/messages/settings/{v1 => v0}/settings.proto (98%) rename protogen/proto/ocis/messages/store/{v1 => v0}/store.proto (94%) rename protogen/proto/ocis/messages/thumbnails/{v1 => v0}/thumbnails.proto (87%) rename protogen/proto/ocis/services/accounts/{v1 => v0}/accounts.proto (95%) rename protogen/proto/ocis/services/settings/{v1 => v0}/settings.proto (85%) rename protogen/proto/ocis/services/store/{v1 => v0}/store.proto (80%) rename protogen/proto/ocis/services/thumbnails/{v1 => v0}/thumbnails.proto (87%) diff --git a/accounts/pkg/command/add_account.go b/accounts/pkg/command/add_account.go index 0b4118c49a8..5e95f5a29aa 100644 --- a/accounts/pkg/command/add_account.go +++ b/accounts/pkg/command/add_account.go @@ -3,8 +3,8 @@ package command import ( "fmt" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" diff --git a/accounts/pkg/command/inspect_account.go b/accounts/pkg/command/inspect_account.go index 1578c6f6609..07314e1d08c 100644 --- a/accounts/pkg/command/inspect_account.go +++ b/accounts/pkg/command/inspect_account.go @@ -5,8 +5,8 @@ import ( "os" "strconv" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/flagset" diff --git a/accounts/pkg/command/list_accounts.go b/accounts/pkg/command/list_accounts.go index 7eff3a4a038..55621c9826d 100644 --- a/accounts/pkg/command/list_accounts.go +++ b/accounts/pkg/command/list_accounts.go @@ -5,8 +5,8 @@ import ( "os" "strconv" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/flagset" diff --git a/accounts/pkg/command/rebuild_index.go b/accounts/pkg/command/rebuild_index.go index 3ff43f11761..5536653bfee 100644 --- a/accounts/pkg/command/rebuild_index.go +++ b/accounts/pkg/command/rebuild_index.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/asim/go-micro/plugins/client/grpc/v4" "github.com/owncloud/ocis/accounts/pkg/config" diff --git a/accounts/pkg/command/remove_account.go b/accounts/pkg/command/remove_account.go index ce54cd87a2e..38d4a495e28 100644 --- a/accounts/pkg/command/remove_account.go +++ b/accounts/pkg/command/remove_account.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/flagset" diff --git a/accounts/pkg/command/update_account.go b/accounts/pkg/command/update_account.go index 91dfacd8115..630edb3e9bb 100644 --- a/accounts/pkg/command/update_account.go +++ b/accounts/pkg/command/update_account.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/flagset" diff --git a/accounts/pkg/flagset/flagset.go b/accounts/pkg/flagset/flagset.go index c0d5512144a..0566a37c8d0 100644 --- a/accounts/pkg/flagset/flagset.go +++ b/accounts/pkg/flagset/flagset.go @@ -1,7 +1,7 @@ package flagset import ( - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/ocis-pkg/flags" diff --git a/accounts/pkg/server/grpc/server.go b/accounts/pkg/server/grpc/server.go index 4e98b0e7800..48def49bdbb 100644 --- a/accounts/pkg/server/grpc/server.go +++ b/accounts/pkg/server/grpc/server.go @@ -1,7 +1,7 @@ package grpc import ( - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" diff --git a/accounts/pkg/server/http/server.go b/accounts/pkg/server/http/server.go index 9af431ef205..31b547c0249 100644 --- a/accounts/pkg/server/http/server.go +++ b/accounts/pkg/server/http/server.go @@ -1,7 +1,7 @@ package http import ( - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/go-chi/chi/v5" chimiddleware "github.com/go-chi/chi/v5/middleware" diff --git a/accounts/pkg/service/v0/accounts.go b/accounts/pkg/service/v0/accounts.go index 0052a96ac8e..2b393cb7106 100644 --- a/accounts/pkg/service/v0/accounts.go +++ b/accounts/pkg/service/v0/accounts.go @@ -16,8 +16,8 @@ import ( "go.opentelemetry.io/otel/attribute" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" @@ -28,7 +28,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" "github.com/owncloud/ocis/ocis-pkg/sync" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" settings_svc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/rs/zerolog" merrors "go-micro.dev/v4/errors" diff --git a/accounts/pkg/service/v0/accounts_permission_test.go b/accounts/pkg/service/v0/accounts_permission_test.go index f98579c2307..8c8dbd07865 100644 --- a/accounts/pkg/service/v0/accounts_permission_test.go +++ b/accounts/pkg/service/v0/accounts_permission_test.go @@ -9,16 +9,16 @@ import ( "testing" "time" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/golang/protobuf/ptypes/empty" "github.com/owncloud/ocis/accounts/pkg/config" olog "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" diff --git a/accounts/pkg/service/v0/groups.go b/accounts/pkg/service/v0/groups.go index 2bd2245efa6..ad45f86ad59 100644 --- a/accounts/pkg/service/v0/groups.go +++ b/accounts/pkg/service/v0/groups.go @@ -5,8 +5,8 @@ import ( "path" "strconv" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/gofrs/uuid" "github.com/golang/protobuf/ptypes/empty" diff --git a/accounts/pkg/service/v0/index.go b/accounts/pkg/service/v0/index.go index 770c4991215..19a7a2138d4 100644 --- a/accounts/pkg/service/v0/index.go +++ b/accounts/pkg/service/v0/index.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/storage" diff --git a/accounts/pkg/service/v0/option.go b/accounts/pkg/service/v0/option.go index e80fa2e3a23..4658ba8b0d4 100644 --- a/accounts/pkg/service/v0/option.go +++ b/accounts/pkg/service/v0/option.go @@ -4,7 +4,7 @@ import ( "github.com/owncloud/ocis/accounts/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // Option defines a single option function. diff --git a/accounts/pkg/service/v0/permissions.go b/accounts/pkg/service/v0/permissions.go index 08c628dfb0e..23bb4077b07 100644 --- a/accounts/pkg/service/v0/permissions.go +++ b/accounts/pkg/service/v0/permissions.go @@ -6,8 +6,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" olog "github.com/owncloud/ocis/ocis-pkg/log" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" ) diff --git a/accounts/pkg/service/v0/service.go b/accounts/pkg/service/v0/service.go index f5f707b704c..7e43f6ce34c 100644 --- a/accounts/pkg/service/v0/service.go +++ b/accounts/pkg/service/v0/service.go @@ -8,7 +8,7 @@ import ( "strings" "time" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" "github.com/pkg/errors" "github.com/owncloud/ocis/ocis-pkg/service/grpc" @@ -22,7 +22,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" oreg "github.com/owncloud/ocis/ocis-pkg/registry" "github.com/owncloud/ocis/ocis-pkg/roles" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // userDefaultGID is the default integer representing the "users" group. diff --git a/accounts/pkg/storage/cs3.go b/accounts/pkg/storage/cs3.go index 58df10d2f7d..eb167c4f3a5 100644 --- a/accounts/pkg/storage/cs3.go +++ b/accounts/pkg/storage/cs3.go @@ -18,7 +18,7 @@ import ( "github.com/owncloud/ocis/accounts/pkg/config" olog "github.com/owncloud/ocis/ocis-pkg/log" metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" "google.golang.org/grpc/metadata" ) diff --git a/accounts/pkg/storage/cs3_test.go b/accounts/pkg/storage/cs3_test.go index f092489a96c..b5c02380eb1 100644 --- a/accounts/pkg/storage/cs3_test.go +++ b/accounts/pkg/storage/cs3_test.go @@ -4,7 +4,7 @@ package storage //import ( // "context" -// accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" +// accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" // "github.com/owncloud/ocis/accounts/pkg/config" // "github.com/stretchr/testify/assert" // "testing" diff --git a/accounts/pkg/storage/disk.go b/accounts/pkg/storage/disk.go index 15eb096fe8b..6516d5c2fe0 100644 --- a/accounts/pkg/storage/disk.go +++ b/accounts/pkg/storage/disk.go @@ -8,7 +8,7 @@ import ( "path/filepath" "sync" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" "github.com/owncloud/ocis/accounts/pkg/config" olog "github.com/owncloud/ocis/ocis-pkg/log" diff --git a/accounts/pkg/storage/repo.go b/accounts/pkg/storage/repo.go index 84617f2c0f9..7b41876c81b 100644 --- a/accounts/pkg/storage/repo.go +++ b/accounts/pkg/storage/repo.go @@ -3,7 +3,7 @@ package storage import ( "context" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" ) const ( diff --git a/glauth/pkg/command/server.go b/glauth/pkg/command/server.go index 9daaaff04cc..d8da2cabbfe 100644 --- a/glauth/pkg/command/server.go +++ b/glauth/pkg/command/server.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" glauthcfg "github.com/glauth/glauth/v2/pkg/config" "github.com/oklog/run" diff --git a/glauth/pkg/server/glauth/ocis.go b/glauth/pkg/server/glauth/ocis.go index ef1f3800da5..ba6c769ac1c 100644 --- a/glauth/pkg/server/glauth/ocis.go +++ b/glauth/pkg/server/glauth/ocis.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/glauth/glauth/v2/pkg/config" "github.com/glauth/glauth/v2/pkg/handler" diff --git a/glauth/pkg/server/glauth/option.go b/glauth/pkg/server/glauth/option.go index cf2f02d2c4a..9b244cd5c6b 100644 --- a/glauth/pkg/server/glauth/option.go +++ b/glauth/pkg/server/glauth/option.go @@ -3,7 +3,7 @@ package glauth import ( "context" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/glauth/glauth/v2/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go index bdec0507dd3..881ddd14729 100644 --- a/graph/pkg/service/v0/drives.go +++ b/graph/pkg/service/v0/drives.go @@ -26,7 +26,7 @@ import ( "github.com/owncloud/ocis/graph/pkg/service/v0/errorcode" "github.com/owncloud/ocis/graph/pkg/service/v0/net" "github.com/owncloud/ocis/ocis-pkg/service/grpc" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" settingsServiceExt "github.com/owncloud/ocis/settings/pkg/service/v0" "gopkg.in/yaml.v2" diff --git a/ocis-pkg/indexer/index/disk/autoincrement_test.go b/ocis-pkg/indexer/index/disk/autoincrement_test.go index 5a2f55d5df6..78f2ef6cd6d 100644 --- a/ocis-pkg/indexer/index/disk/autoincrement_test.go +++ b/ocis-pkg/indexer/index/disk/autoincrement_test.go @@ -8,7 +8,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/indexer/option" //. "github.com/owncloud/ocis/ocis-pkg/indexer/test" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" "github.com/stretchr/testify/assert" ) diff --git a/ocis-pkg/roles/cache.go b/ocis-pkg/roles/cache.go index 8b94c8dd1d7..f356a6903c4 100644 --- a/ocis-pkg/roles/cache.go +++ b/ocis-pkg/roles/cache.go @@ -4,7 +4,7 @@ import ( "time" "github.com/owncloud/ocis/ocis-pkg/sync" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" ) // cache is a cache implementation for roles, keyed by roleIDs. diff --git a/ocis-pkg/roles/cache_test.go b/ocis-pkg/roles/cache_test.go index 7300e5a59ac..e85666ba567 100644 --- a/ocis-pkg/roles/cache_test.go +++ b/ocis-pkg/roles/cache_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/stretchr/testify/assert" ) diff --git a/ocis-pkg/roles/manager.go b/ocis-pkg/roles/manager.go index afe8cc1167c..8ea08adfae8 100644 --- a/ocis-pkg/roles/manager.go +++ b/ocis-pkg/roles/manager.go @@ -4,8 +4,8 @@ import ( "context" "github.com/owncloud/ocis/ocis-pkg/log" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // Manager manages a cache of roles by fetching unknown roles from the settings.RoleService. diff --git a/ocis-pkg/roles/option.go b/ocis-pkg/roles/option.go index 5f3460cd14a..74f688cecd0 100644 --- a/ocis-pkg/roles/option.go +++ b/ocis-pkg/roles/option.go @@ -4,7 +4,7 @@ import ( "time" "github.com/owncloud/ocis/ocis-pkg/log" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // Options are all the possible options. diff --git a/ocs/pkg/server/http/svc_test.go b/ocs/pkg/server/http/svc_test.go index a345e558687..4cbace8d424 100644 --- a/ocs/pkg/server/http/svc_test.go +++ b/ocs/pkg/server/http/svc_test.go @@ -27,10 +27,10 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocs/pkg/config" svc "github.com/owncloud/ocis/ocs/pkg/service/v0" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ssvc "github.com/owncloud/ocis/settings/pkg/service/v0" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" diff --git a/ocs/pkg/service/v0/groups.go b/ocs/pkg/service/v0/groups.go index e6764075795..82644081393 100644 --- a/ocs/pkg/service/v0/groups.go +++ b/ocs/pkg/service/v0/groups.go @@ -9,8 +9,8 @@ import ( "regexp" "strconv" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" revactx "github.com/cs3org/reva/pkg/ctx" "github.com/go-chi/chi/v5" diff --git a/ocs/pkg/service/v0/option.go b/ocs/pkg/service/v0/option.go index c0d97710cc9..4b142ca5466 100644 --- a/ocs/pkg/service/v0/option.go +++ b/ocs/pkg/service/v0/option.go @@ -6,7 +6,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/roles" "github.com/owncloud/ocis/ocs/pkg/config" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // Option defines a single option function. diff --git a/ocs/pkg/service/v0/service.go b/ocs/pkg/service/v0/service.go index 368c1f38e08..f484dd17b32 100644 --- a/ocs/pkg/service/v0/service.go +++ b/ocs/pkg/service/v0/service.go @@ -11,7 +11,7 @@ import ( "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/render" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/ocis-pkg/account" "github.com/owncloud/ocis/ocis-pkg/log" @@ -21,7 +21,7 @@ import ( ocsm "github.com/owncloud/ocis/ocs/pkg/middleware" "github.com/owncloud/ocis/ocs/pkg/service/v0/data" "github.com/owncloud/ocis/ocs/pkg/service/v0/response" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "github.com/owncloud/ocis/proxy/pkg/user/backend" ) diff --git a/ocs/pkg/service/v0/users.go b/ocs/pkg/service/v0/users.go index cf55f10ee24..aaa781a6fc2 100644 --- a/ocs/pkg/service/v0/users.go +++ b/ocs/pkg/service/v0/users.go @@ -10,11 +10,11 @@ import ( "strconv" "strings" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" - storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" "github.com/asim/go-micro/plugins/client/grpc/v4" revauser "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.go similarity index 92% rename from protogen/gen/ocis/messages/accounts/v1/accounts.pb.go rename to protogen/gen/ocis/messages/accounts/v0/accounts.pb.go index ac50fa2e972..ced523b4aed 100644 --- a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.go +++ b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/messages/accounts/v1/accounts.proto +// source: ocis/messages/accounts/v0/accounts.proto -package v1 +package v0 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -129,7 +129,7 @@ type Account struct { func (x *Account) Reset() { *x = Account{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[0] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +142,7 @@ func (x *Account) String() string { func (*Account) ProtoMessage() {} func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[0] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +155,7 @@ func (x *Account) ProtoReflect() protoreflect.Message { // Deprecated: Use Account.ProtoReflect.Descriptor instead. func (*Account) Descriptor() ([]byte, []int) { - return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{0} + return file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP(), []int{0} } func (x *Account) GetId() string { @@ -386,7 +386,7 @@ type Identities struct { func (x *Identities) Reset() { *x = Identities{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[1] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -399,7 +399,7 @@ func (x *Identities) String() string { func (*Identities) ProtoMessage() {} func (x *Identities) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[1] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -412,7 +412,7 @@ func (x *Identities) ProtoReflect() protoreflect.Message { // Deprecated: Use Identities.ProtoReflect.Descriptor instead. func (*Identities) Descriptor() ([]byte, []int) { - return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{1} + return file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP(), []int{1} } func (x *Identities) GetSignInType() string { @@ -460,7 +460,7 @@ type PasswordProfile struct { func (x *PasswordProfile) Reset() { *x = PasswordProfile{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[2] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -473,7 +473,7 @@ func (x *PasswordProfile) String() string { func (*PasswordProfile) ProtoMessage() {} func (x *PasswordProfile) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[2] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -486,7 +486,7 @@ func (x *PasswordProfile) ProtoReflect() protoreflect.Message { // Deprecated: Use PasswordProfile.ProtoReflect.Descriptor instead. func (*PasswordProfile) Descriptor() ([]byte, []int) { - return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{2} + return file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP(), []int{2} } func (x *PasswordProfile) GetPassword() string { @@ -599,7 +599,7 @@ type Group struct { func (x *Group) Reset() { *x = Group{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[3] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -612,7 +612,7 @@ func (x *Group) String() string { func (*Group) ProtoMessage() {} func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[3] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -625,7 +625,7 @@ func (x *Group) ProtoReflect() protoreflect.Message { // Deprecated: Use Group.ProtoReflect.Descriptor instead. func (*Group) Descriptor() ([]byte, []int) { - return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{3} + return file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP(), []int{3} } func (x *Group) GetId() string { @@ -786,7 +786,7 @@ type OnPremisesProvisioningError struct { func (x *OnPremisesProvisioningError) Reset() { *x = OnPremisesProvisioningError{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[4] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -799,7 +799,7 @@ func (x *OnPremisesProvisioningError) String() string { func (*OnPremisesProvisioningError) ProtoMessage() {} func (x *OnPremisesProvisioningError) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_accounts_v1_accounts_proto_msgTypes[4] + mi := &file_ocis_messages_accounts_v0_accounts_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -812,7 +812,7 @@ func (x *OnPremisesProvisioningError) ProtoReflect() protoreflect.Message { // Deprecated: Use OnPremisesProvisioningError.ProtoReflect.Descriptor instead. func (*OnPremisesProvisioningError) Descriptor() ([]byte, []int) { - return file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP(), []int{4} + return file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP(), []int{4} } func (x *OnPremisesProvisioningError) GetCategory() string { @@ -843,14 +843,14 @@ func (x *OnPremisesProvisioningError) GetValue() string { return "" } -var File_ocis_messages_accounts_v1_accounts_proto protoreflect.FileDescriptor +var File_ocis_messages_accounts_v0_accounts_proto protoreflect.FileDescriptor -var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ +var file_ocis_messages_accounts_v0_accounts_proto_rawDesc = []byte{ 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x74, 0x73, 0x2e, 0x76, 0x30, 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, 0x22, 0xcc, 0x0d, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, @@ -864,7 +864,7 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, @@ -881,12 +881,12 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x73, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, @@ -934,7 +934,7 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x50, 0x72, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, @@ -997,11 +997,11 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3a, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x6f, + 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, @@ -1061,7 +1061,7 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xcf, @@ -1082,49 +1082,49 @@ var file_ocis_messages_accounts_v1_accounts_proto_rawDesc = []byte{ 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_ocis_messages_accounts_v1_accounts_proto_rawDescOnce sync.Once - file_ocis_messages_accounts_v1_accounts_proto_rawDescData = file_ocis_messages_accounts_v1_accounts_proto_rawDesc + file_ocis_messages_accounts_v0_accounts_proto_rawDescOnce sync.Once + file_ocis_messages_accounts_v0_accounts_proto_rawDescData = file_ocis_messages_accounts_v0_accounts_proto_rawDesc ) -func file_ocis_messages_accounts_v1_accounts_proto_rawDescGZIP() []byte { - file_ocis_messages_accounts_v1_accounts_proto_rawDescOnce.Do(func() { - file_ocis_messages_accounts_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_accounts_v1_accounts_proto_rawDescData) +func file_ocis_messages_accounts_v0_accounts_proto_rawDescGZIP() []byte { + file_ocis_messages_accounts_v0_accounts_proto_rawDescOnce.Do(func() { + file_ocis_messages_accounts_v0_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_accounts_v0_accounts_proto_rawDescData) }) - return file_ocis_messages_accounts_v1_accounts_proto_rawDescData + return file_ocis_messages_accounts_v0_accounts_proto_rawDescData } -var file_ocis_messages_accounts_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_ocis_messages_accounts_v1_accounts_proto_goTypes = []interface{}{ - (*Account)(nil), // 0: ocis.messages.accounts.v1.Account - (*Identities)(nil), // 1: ocis.messages.accounts.v1.Identities - (*PasswordProfile)(nil), // 2: ocis.messages.accounts.v1.PasswordProfile - (*Group)(nil), // 3: ocis.messages.accounts.v1.Group - (*OnPremisesProvisioningError)(nil), // 4: ocis.messages.accounts.v1.OnPremisesProvisioningError +var file_ocis_messages_accounts_v0_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_ocis_messages_accounts_v0_accounts_proto_goTypes = []interface{}{ + (*Account)(nil), // 0: ocis.messages.accounts.v0.Account + (*Identities)(nil), // 1: ocis.messages.accounts.v0.Identities + (*PasswordProfile)(nil), // 2: ocis.messages.accounts.v0.PasswordProfile + (*Group)(nil), // 3: ocis.messages.accounts.v0.Group + (*OnPremisesProvisioningError)(nil), // 4: ocis.messages.accounts.v0.OnPremisesProvisioningError (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp } -var file_ocis_messages_accounts_v1_accounts_proto_depIdxs = []int32{ - 1, // 0: ocis.messages.accounts.v1.Account.identities:type_name -> ocis.messages.accounts.v1.Identities - 2, // 1: ocis.messages.accounts.v1.Account.password_profile:type_name -> ocis.messages.accounts.v1.PasswordProfile - 3, // 2: ocis.messages.accounts.v1.Account.memberOf:type_name -> ocis.messages.accounts.v1.Group - 5, // 3: ocis.messages.accounts.v1.Account.created_date_time:type_name -> google.protobuf.Timestamp - 5, // 4: ocis.messages.accounts.v1.Account.deleted_date_time:type_name -> google.protobuf.Timestamp - 5, // 5: ocis.messages.accounts.v1.Account.on_premises_last_sync_date_time:type_name -> google.protobuf.Timestamp - 4, // 6: ocis.messages.accounts.v1.Account.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v1.OnPremisesProvisioningError - 5, // 7: ocis.messages.accounts.v1.Account.external_user_state_change_date_time:type_name -> google.protobuf.Timestamp - 5, // 8: ocis.messages.accounts.v1.Account.refresh_tokens_valid_from_date_time:type_name -> google.protobuf.Timestamp - 5, // 9: ocis.messages.accounts.v1.Account.sign_in_sessions_valid_from_date_time:type_name -> google.protobuf.Timestamp - 5, // 10: ocis.messages.accounts.v1.PasswordProfile.last_password_change_date_time:type_name -> google.protobuf.Timestamp - 0, // 11: ocis.messages.accounts.v1.Group.members:type_name -> ocis.messages.accounts.v1.Account - 0, // 12: ocis.messages.accounts.v1.Group.owners:type_name -> ocis.messages.accounts.v1.Account - 5, // 13: ocis.messages.accounts.v1.Group.created_date_time:type_name -> google.protobuf.Timestamp - 5, // 14: ocis.messages.accounts.v1.Group.deleted_date_time:type_name -> google.protobuf.Timestamp - 5, // 15: ocis.messages.accounts.v1.Group.expiration_date_time:type_name -> google.protobuf.Timestamp - 4, // 16: ocis.messages.accounts.v1.Group.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v1.OnPremisesProvisioningError - 5, // 17: ocis.messages.accounts.v1.OnPremisesProvisioningError.occurred_date_time:type_name -> google.protobuf.Timestamp +var file_ocis_messages_accounts_v0_accounts_proto_depIdxs = []int32{ + 1, // 0: ocis.messages.accounts.v0.Account.identities:type_name -> ocis.messages.accounts.v0.Identities + 2, // 1: ocis.messages.accounts.v0.Account.password_profile:type_name -> ocis.messages.accounts.v0.PasswordProfile + 3, // 2: ocis.messages.accounts.v0.Account.memberOf:type_name -> ocis.messages.accounts.v0.Group + 5, // 3: ocis.messages.accounts.v0.Account.created_date_time:type_name -> google.protobuf.Timestamp + 5, // 4: ocis.messages.accounts.v0.Account.deleted_date_time:type_name -> google.protobuf.Timestamp + 5, // 5: ocis.messages.accounts.v0.Account.on_premises_last_sync_date_time:type_name -> google.protobuf.Timestamp + 4, // 6: ocis.messages.accounts.v0.Account.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v0.OnPremisesProvisioningError + 5, // 7: ocis.messages.accounts.v0.Account.external_user_state_change_date_time:type_name -> google.protobuf.Timestamp + 5, // 8: ocis.messages.accounts.v0.Account.refresh_tokens_valid_from_date_time:type_name -> google.protobuf.Timestamp + 5, // 9: ocis.messages.accounts.v0.Account.sign_in_sessions_valid_from_date_time:type_name -> google.protobuf.Timestamp + 5, // 10: ocis.messages.accounts.v0.PasswordProfile.last_password_change_date_time:type_name -> google.protobuf.Timestamp + 0, // 11: ocis.messages.accounts.v0.Group.members:type_name -> ocis.messages.accounts.v0.Account + 0, // 12: ocis.messages.accounts.v0.Group.owners:type_name -> ocis.messages.accounts.v0.Account + 5, // 13: ocis.messages.accounts.v0.Group.created_date_time:type_name -> google.protobuf.Timestamp + 5, // 14: ocis.messages.accounts.v0.Group.deleted_date_time:type_name -> google.protobuf.Timestamp + 5, // 15: ocis.messages.accounts.v0.Group.expiration_date_time:type_name -> google.protobuf.Timestamp + 4, // 16: ocis.messages.accounts.v0.Group.on_premises_provisioning_errors:type_name -> ocis.messages.accounts.v0.OnPremisesProvisioningError + 5, // 17: ocis.messages.accounts.v0.OnPremisesProvisioningError.occurred_date_time:type_name -> google.protobuf.Timestamp 18, // [18:18] is the sub-list for method output_type 18, // [18:18] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name @@ -1132,13 +1132,13 @@ var file_ocis_messages_accounts_v1_accounts_proto_depIdxs = []int32{ 0, // [0:18] is the sub-list for field type_name } -func init() { file_ocis_messages_accounts_v1_accounts_proto_init() } -func file_ocis_messages_accounts_v1_accounts_proto_init() { - if File_ocis_messages_accounts_v1_accounts_proto != nil { +func init() { file_ocis_messages_accounts_v0_accounts_proto_init() } +func file_ocis_messages_accounts_v0_accounts_proto_init() { + if File_ocis_messages_accounts_v0_accounts_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_messages_accounts_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_accounts_v0_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Account); i { case 0: return &v.state @@ -1150,7 +1150,7 @@ func file_ocis_messages_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_messages_accounts_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_accounts_v0_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Identities); i { case 0: return &v.state @@ -1162,7 +1162,7 @@ func file_ocis_messages_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_messages_accounts_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_accounts_v0_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PasswordProfile); i { case 0: return &v.state @@ -1174,7 +1174,7 @@ func file_ocis_messages_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_messages_accounts_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_accounts_v0_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Group); i { case 0: return &v.state @@ -1186,7 +1186,7 @@ func file_ocis_messages_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_messages_accounts_v1_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_accounts_v0_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OnPremisesProvisioningError); i { case 0: return &v.state @@ -1203,18 +1203,18 @@ func file_ocis_messages_accounts_v1_accounts_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_messages_accounts_v1_accounts_proto_rawDesc, + RawDescriptor: file_ocis_messages_accounts_v0_accounts_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ocis_messages_accounts_v1_accounts_proto_goTypes, - DependencyIndexes: file_ocis_messages_accounts_v1_accounts_proto_depIdxs, - MessageInfos: file_ocis_messages_accounts_v1_accounts_proto_msgTypes, + GoTypes: file_ocis_messages_accounts_v0_accounts_proto_goTypes, + DependencyIndexes: file_ocis_messages_accounts_v0_accounts_proto_depIdxs, + MessageInfos: file_ocis_messages_accounts_v0_accounts_proto_msgTypes, }.Build() - File_ocis_messages_accounts_v1_accounts_proto = out.File - file_ocis_messages_accounts_v1_accounts_proto_rawDesc = nil - file_ocis_messages_accounts_v1_accounts_proto_goTypes = nil - file_ocis_messages_accounts_v1_accounts_proto_depIdxs = nil + File_ocis_messages_accounts_v0_accounts_proto = out.File + file_ocis_messages_accounts_v0_accounts_proto_rawDesc = nil + file_ocis_messages_accounts_v0_accounts_proto_goTypes = nil + file_ocis_messages_accounts_v0_accounts_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.micro.go similarity index 83% rename from protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go rename to protogen/gen/ocis/messages/accounts/v0/accounts.pb.micro.go index 35dd36abe91..d60f2d11060 100644 --- a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.micro.go +++ b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.micro.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/messages/accounts/v1/accounts.proto +// source: ocis/messages/accounts/v0/accounts.proto -package v1 +package v0 import ( fmt "fmt" diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.web.go similarity index 99% rename from protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go rename to protogen/gen/ocis/messages/accounts/v0/accounts.pb.web.go index 936cee72374..2ee0b94f4f0 100644 --- a/protogen/gen/ocis/messages/accounts/v1/accounts.pb.web.go +++ b/protogen/gen/ocis/messages/accounts/v0/accounts.pb.web.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: v1.proto +// source: v0.proto -package v1 +package v0 import ( "bytes" diff --git a/protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/messages/accounts/v0/accounts.swagger.json similarity index 92% rename from protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json rename to protogen/gen/ocis/messages/accounts/v0/accounts.swagger.json index 2b36629592a..bc6d8c7c0d1 100644 --- a/protogen/gen/ocis/messages/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/messages/accounts/v0/accounts.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "ocis/messages/accounts/v1/accounts.proto", + "title": "ocis/messages/accounts/v0/accounts.proto", "version": "version not set" }, "consumes": [ diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.go b/protogen/gen/ocis/messages/settings/v0/settings.pb.go similarity index 83% rename from protogen/gen/ocis/messages/settings/v1/settings.pb.go rename to protogen/gen/ocis/messages/settings/v0/settings.pb.go index 1b7630c7038..c4522665c36 100644 --- a/protogen/gen/ocis/messages/settings/v1/settings.pb.go +++ b/protogen/gen/ocis/messages/settings/v0/settings.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/messages/settings/v1/settings.proto +// source: ocis/messages/settings/v0/settings.proto -package v1 +package v0 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -68,11 +68,11 @@ func (x Resource_Type) String() string { } func (Resource_Type) Descriptor() protoreflect.EnumDescriptor { - return file_ocis_messages_settings_v1_settings_proto_enumTypes[0].Descriptor() + return file_ocis_messages_settings_v0_settings_proto_enumTypes[0].Descriptor() } func (Resource_Type) Type() protoreflect.EnumType { - return &file_ocis_messages_settings_v1_settings_proto_enumTypes[0] + return &file_ocis_messages_settings_v0_settings_proto_enumTypes[0] } func (x Resource_Type) Number() protoreflect.EnumNumber { @@ -81,7 +81,7 @@ func (x Resource_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Resource_Type.Descriptor instead. func (Resource_Type) EnumDescriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{3, 0} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{3, 0} } type Bundle_Type int32 @@ -117,11 +117,11 @@ func (x Bundle_Type) String() string { } func (Bundle_Type) Descriptor() protoreflect.EnumDescriptor { - return file_ocis_messages_settings_v1_settings_proto_enumTypes[1].Descriptor() + return file_ocis_messages_settings_v0_settings_proto_enumTypes[1].Descriptor() } func (Bundle_Type) Type() protoreflect.EnumType { - return &file_ocis_messages_settings_v1_settings_proto_enumTypes[1] + return &file_ocis_messages_settings_v0_settings_proto_enumTypes[1] } func (x Bundle_Type) Number() protoreflect.EnumNumber { @@ -130,7 +130,7 @@ func (x Bundle_Type) Number() protoreflect.EnumNumber { // Deprecated: Use Bundle_Type.Descriptor instead. func (Bundle_Type) EnumDescriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{4, 0} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{4, 0} } type Permission_Operation int32 @@ -178,11 +178,11 @@ func (x Permission_Operation) String() string { } func (Permission_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_ocis_messages_settings_v1_settings_proto_enumTypes[2].Descriptor() + return file_ocis_messages_settings_v0_settings_proto_enumTypes[2].Descriptor() } func (Permission_Operation) Type() protoreflect.EnumType { - return &file_ocis_messages_settings_v1_settings_proto_enumTypes[2] + return &file_ocis_messages_settings_v0_settings_proto_enumTypes[2] } func (x Permission_Operation) Number() protoreflect.EnumNumber { @@ -191,7 +191,7 @@ func (x Permission_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use Permission_Operation.Descriptor instead. func (Permission_Operation) EnumDescriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12, 0} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{12, 0} } type Permission_Constraint int32 @@ -230,11 +230,11 @@ func (x Permission_Constraint) String() string { } func (Permission_Constraint) Descriptor() protoreflect.EnumDescriptor { - return file_ocis_messages_settings_v1_settings_proto_enumTypes[3].Descriptor() + return file_ocis_messages_settings_v0_settings_proto_enumTypes[3].Descriptor() } func (Permission_Constraint) Type() protoreflect.EnumType { - return &file_ocis_messages_settings_v1_settings_proto_enumTypes[3] + return &file_ocis_messages_settings_v0_settings_proto_enumTypes[3] } func (x Permission_Constraint) Number() protoreflect.EnumNumber { @@ -243,7 +243,7 @@ func (x Permission_Constraint) Number() protoreflect.EnumNumber { // Deprecated: Use Permission_Constraint.Descriptor instead. func (Permission_Constraint) EnumDescriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12, 1} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{12, 1} } type ValueWithIdentifier struct { @@ -258,7 +258,7 @@ type ValueWithIdentifier struct { func (x *ValueWithIdentifier) Reset() { *x = ValueWithIdentifier{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[0] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -271,7 +271,7 @@ func (x *ValueWithIdentifier) String() string { func (*ValueWithIdentifier) ProtoMessage() {} func (x *ValueWithIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[0] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -284,7 +284,7 @@ func (x *ValueWithIdentifier) ProtoReflect() protoreflect.Message { // Deprecated: Use ValueWithIdentifier.ProtoReflect.Descriptor instead. func (*ValueWithIdentifier) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{0} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{0} } func (x *ValueWithIdentifier) GetIdentifier() *Identifier { @@ -314,7 +314,7 @@ type Identifier struct { func (x *Identifier) Reset() { *x = Identifier{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[1] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -327,7 +327,7 @@ func (x *Identifier) String() string { func (*Identifier) ProtoMessage() {} func (x *Identifier) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[1] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -340,7 +340,7 @@ func (x *Identifier) ProtoReflect() protoreflect.Message { // Deprecated: Use Identifier.ProtoReflect.Descriptor instead. func (*Identifier) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{1} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{1} } func (x *Identifier) GetExtension() string { @@ -379,7 +379,7 @@ type UserRoleAssignment struct { func (x *UserRoleAssignment) Reset() { *x = UserRoleAssignment{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[2] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -392,7 +392,7 @@ func (x *UserRoleAssignment) String() string { func (*UserRoleAssignment) ProtoMessage() {} func (x *UserRoleAssignment) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[2] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -405,7 +405,7 @@ func (x *UserRoleAssignment) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRoleAssignment.ProtoReflect.Descriptor instead. func (*UserRoleAssignment) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{2} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{2} } func (x *UserRoleAssignment) GetId() string { @@ -434,14 +434,14 @@ type Resource struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type Resource_Type `protobuf:"varint,1,opt,name=type,proto3,enum=ocis.messages.settings.v1.Resource_Type" json:"type,omitempty"` + Type Resource_Type `protobuf:"varint,1,opt,name=type,proto3,enum=ocis.messages.settings.v0.Resource_Type" json:"type,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[3] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -454,7 +454,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[3] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -467,7 +467,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{3} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{3} } func (x *Resource) GetType() Resource_Type { @@ -491,7 +491,7 @@ type Bundle struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=ocis.messages.settings.v1.Bundle_Type" json:"type,omitempty"` + Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=ocis.messages.settings.v0.Bundle_Type" json:"type,omitempty"` Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"` DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` Settings []*Setting `protobuf:"bytes,6,rep,name=settings,proto3" json:"settings,omitempty"` @@ -501,7 +501,7 @@ type Bundle struct { func (x *Bundle) Reset() { *x = Bundle{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[4] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -514,7 +514,7 @@ func (x *Bundle) String() string { func (*Bundle) ProtoMessage() {} func (x *Bundle) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[4] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -527,7 +527,7 @@ func (x *Bundle) ProtoReflect() protoreflect.Message { // Deprecated: Use Bundle.ProtoReflect.Descriptor instead. func (*Bundle) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{4} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{4} } func (x *Bundle) GetId() string { @@ -602,7 +602,7 @@ type Setting struct { func (x *Setting) Reset() { *x = Setting{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[5] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -615,7 +615,7 @@ func (x *Setting) String() string { func (*Setting) ProtoMessage() {} func (x *Setting) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[5] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -628,7 +628,7 @@ func (x *Setting) ProtoReflect() protoreflect.Message { // Deprecated: Use Setting.ProtoReflect.Descriptor instead. func (*Setting) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{5} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{5} } func (x *Setting) GetId() string { @@ -770,7 +770,7 @@ type Int struct { func (x *Int) Reset() { *x = Int{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[6] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -783,7 +783,7 @@ func (x *Int) String() string { func (*Int) ProtoMessage() {} func (x *Int) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[6] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -796,7 +796,7 @@ func (x *Int) ProtoReflect() protoreflect.Message { // Deprecated: Use Int.ProtoReflect.Descriptor instead. func (*Int) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{6} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{6} } func (x *Int) GetDefault() int64 { @@ -849,7 +849,7 @@ type String struct { func (x *String) Reset() { *x = String{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[7] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -862,7 +862,7 @@ func (x *String) String() string { func (*String) ProtoMessage() {} func (x *String) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[7] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -875,7 +875,7 @@ func (x *String) ProtoReflect() protoreflect.Message { // Deprecated: Use String.ProtoReflect.Descriptor instead. func (*String) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{7} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{7} } func (x *String) GetDefault() string { @@ -925,7 +925,7 @@ type Bool struct { func (x *Bool) Reset() { *x = Bool{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[8] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -938,7 +938,7 @@ func (x *Bool) String() string { func (*Bool) ProtoMessage() {} func (x *Bool) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[8] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -951,7 +951,7 @@ func (x *Bool) ProtoReflect() protoreflect.Message { // Deprecated: Use Bool.ProtoReflect.Descriptor instead. func (*Bool) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{8} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{8} } func (x *Bool) GetDefault() bool { @@ -979,7 +979,7 @@ type SingleChoiceList struct { func (x *SingleChoiceList) Reset() { *x = SingleChoiceList{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[9] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -992,7 +992,7 @@ func (x *SingleChoiceList) String() string { func (*SingleChoiceList) ProtoMessage() {} func (x *SingleChoiceList) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[9] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1005,7 +1005,7 @@ func (x *SingleChoiceList) ProtoReflect() protoreflect.Message { // Deprecated: Use SingleChoiceList.ProtoReflect.Descriptor instead. func (*SingleChoiceList) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{9} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{9} } func (x *SingleChoiceList) GetOptions() []*ListOption { @@ -1026,7 +1026,7 @@ type MultiChoiceList struct { func (x *MultiChoiceList) Reset() { *x = MultiChoiceList{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[10] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1039,7 +1039,7 @@ func (x *MultiChoiceList) String() string { func (*MultiChoiceList) ProtoMessage() {} func (x *MultiChoiceList) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[10] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1052,7 +1052,7 @@ func (x *MultiChoiceList) ProtoReflect() protoreflect.Message { // Deprecated: Use MultiChoiceList.ProtoReflect.Descriptor instead. func (*MultiChoiceList) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{10} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{10} } func (x *MultiChoiceList) GetOptions() []*ListOption { @@ -1075,7 +1075,7 @@ type ListOption struct { func (x *ListOption) Reset() { *x = ListOption{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[11] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1088,7 +1088,7 @@ func (x *ListOption) String() string { func (*ListOption) ProtoMessage() {} func (x *ListOption) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[11] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1101,7 +1101,7 @@ func (x *ListOption) ProtoReflect() protoreflect.Message { // Deprecated: Use ListOption.ProtoReflect.Descriptor instead. func (*ListOption) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{11} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{11} } func (x *ListOption) GetValue() *ListOptionValue { @@ -1130,14 +1130,14 @@ type Permission struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=ocis.messages.settings.v1.Permission_Operation" json:"operation,omitempty"` - Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=ocis.messages.settings.v1.Permission_Constraint" json:"constraint,omitempty"` + Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=ocis.messages.settings.v0.Permission_Operation" json:"operation,omitempty"` + Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=ocis.messages.settings.v0.Permission_Constraint" json:"constraint,omitempty"` } func (x *Permission) Reset() { *x = Permission{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[12] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1150,7 +1150,7 @@ func (x *Permission) String() string { func (*Permission) ProtoMessage() {} func (x *Permission) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[12] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1163,7 +1163,7 @@ func (x *Permission) ProtoReflect() protoreflect.Message { // Deprecated: Use Permission.ProtoReflect.Descriptor instead. func (*Permission) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{12} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{12} } func (x *Permission) GetOperation() Permission_Operation { @@ -1203,7 +1203,7 @@ type Value struct { func (x *Value) Reset() { *x = Value{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[13] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1216,7 +1216,7 @@ func (x *Value) String() string { func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[13] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1229,7 +1229,7 @@ func (x *Value) ProtoReflect() protoreflect.Message { // Deprecated: Use Value.ProtoReflect.Descriptor instead. func (*Value) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{13} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{13} } func (x *Value) GetId() string { @@ -1341,7 +1341,7 @@ type ListValue struct { func (x *ListValue) Reset() { *x = ListValue{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[14] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1354,7 +1354,7 @@ func (x *ListValue) String() string { func (*ListValue) ProtoMessage() {} func (x *ListValue) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[14] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1367,7 +1367,7 @@ func (x *ListValue) ProtoReflect() protoreflect.Message { // Deprecated: Use ListValue.ProtoReflect.Descriptor instead. func (*ListValue) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{14} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{14} } func (x *ListValue) GetValues() []*ListOptionValue { @@ -1391,7 +1391,7 @@ type ListOptionValue struct { func (x *ListOptionValue) Reset() { *x = ListOptionValue{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[15] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1404,7 +1404,7 @@ func (x *ListOptionValue) String() string { func (*ListOptionValue) ProtoMessage() {} func (x *ListOptionValue) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_settings_v1_settings_proto_msgTypes[15] + mi := &file_ocis_messages_settings_v0_settings_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1417,7 +1417,7 @@ func (x *ListOptionValue) ProtoReflect() protoreflect.Message { // Deprecated: Use ListOptionValue.ProtoReflect.Descriptor instead. func (*ListOptionValue) Descriptor() ([]byte, []int) { - return file_ocis_messages_settings_v1_settings_proto_rawDescGZIP(), []int{15} + return file_ocis_messages_settings_v0_settings_proto_rawDescGZIP(), []int{15} } func (m *ListOptionValue) GetOption() isListOptionValue_Option { @@ -1457,22 +1457,22 @@ func (*ListOptionValue_StringValue) isListOptionValue_Option() {} func (*ListOptionValue_IntValue) isListOptionValue_Option() {} -var File_ocis_messages_settings_v1_settings_proto protoreflect.FileDescriptor +var File_ocis_messages_settings_v0_settings_proto protoreflect.FileDescriptor -var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ +var file_ocis_messages_settings_v0_settings_proto_rawDesc = []byte{ 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x76, 0x31, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, + 0x67, 0x73, 0x2e, 0x76, 0x30, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5c, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, @@ -1489,7 +1489,7 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, + 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, @@ -1505,7 +1505,7 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, @@ -1513,11 +1513,11 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, @@ -1532,37 +1532,37 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x49, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, + 0x76, 0x30, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5d, 0x0a, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x11, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, + 0x30, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x52, 0x0a, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x64, 0x65, 0x66, @@ -1589,17 +1589,17 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, @@ -1608,12 +1608,12 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x22, 0xbb, 0x03, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0xa6, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, @@ -1643,7 +1643,7 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x75, 0x6e, 0x74, 0x55, 0x75, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, + 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, @@ -1653,13 +1653,13 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4f, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x5f, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, @@ -1671,67 +1671,67 @@ var file_ocis_messages_settings_v1_settings_proto_rawDesc = []byte{ 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_ocis_messages_settings_v1_settings_proto_rawDescOnce sync.Once - file_ocis_messages_settings_v1_settings_proto_rawDescData = file_ocis_messages_settings_v1_settings_proto_rawDesc + file_ocis_messages_settings_v0_settings_proto_rawDescOnce sync.Once + file_ocis_messages_settings_v0_settings_proto_rawDescData = file_ocis_messages_settings_v0_settings_proto_rawDesc ) -func file_ocis_messages_settings_v1_settings_proto_rawDescGZIP() []byte { - file_ocis_messages_settings_v1_settings_proto_rawDescOnce.Do(func() { - file_ocis_messages_settings_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_settings_v1_settings_proto_rawDescData) +func file_ocis_messages_settings_v0_settings_proto_rawDescGZIP() []byte { + file_ocis_messages_settings_v0_settings_proto_rawDescOnce.Do(func() { + file_ocis_messages_settings_v0_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_settings_v0_settings_proto_rawDescData) }) - return file_ocis_messages_settings_v1_settings_proto_rawDescData -} - -var file_ocis_messages_settings_v1_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_ocis_messages_settings_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_ocis_messages_settings_v1_settings_proto_goTypes = []interface{}{ - (Resource_Type)(0), // 0: ocis.messages.settings.v1.Resource.Type - (Bundle_Type)(0), // 1: ocis.messages.settings.v1.Bundle.Type - (Permission_Operation)(0), // 2: ocis.messages.settings.v1.Permission.Operation - (Permission_Constraint)(0), // 3: ocis.messages.settings.v1.Permission.Constraint - (*ValueWithIdentifier)(nil), // 4: ocis.messages.settings.v1.ValueWithIdentifier - (*Identifier)(nil), // 5: ocis.messages.settings.v1.Identifier - (*UserRoleAssignment)(nil), // 6: ocis.messages.settings.v1.UserRoleAssignment - (*Resource)(nil), // 7: ocis.messages.settings.v1.Resource - (*Bundle)(nil), // 8: ocis.messages.settings.v1.Bundle - (*Setting)(nil), // 9: ocis.messages.settings.v1.Setting - (*Int)(nil), // 10: ocis.messages.settings.v1.Int - (*String)(nil), // 11: ocis.messages.settings.v1.String - (*Bool)(nil), // 12: ocis.messages.settings.v1.Bool - (*SingleChoiceList)(nil), // 13: ocis.messages.settings.v1.SingleChoiceList - (*MultiChoiceList)(nil), // 14: ocis.messages.settings.v1.MultiChoiceList - (*ListOption)(nil), // 15: ocis.messages.settings.v1.ListOption - (*Permission)(nil), // 16: ocis.messages.settings.v1.Permission - (*Value)(nil), // 17: ocis.messages.settings.v1.Value - (*ListValue)(nil), // 18: ocis.messages.settings.v1.ListValue - (*ListOptionValue)(nil), // 19: ocis.messages.settings.v1.ListOptionValue -} -var file_ocis_messages_settings_v1_settings_proto_depIdxs = []int32{ - 5, // 0: ocis.messages.settings.v1.ValueWithIdentifier.identifier:type_name -> ocis.messages.settings.v1.Identifier - 17, // 1: ocis.messages.settings.v1.ValueWithIdentifier.value:type_name -> ocis.messages.settings.v1.Value - 0, // 2: ocis.messages.settings.v1.Resource.type:type_name -> ocis.messages.settings.v1.Resource.Type - 1, // 3: ocis.messages.settings.v1.Bundle.type:type_name -> ocis.messages.settings.v1.Bundle.Type - 9, // 4: ocis.messages.settings.v1.Bundle.settings:type_name -> ocis.messages.settings.v1.Setting - 7, // 5: ocis.messages.settings.v1.Bundle.resource:type_name -> ocis.messages.settings.v1.Resource - 10, // 6: ocis.messages.settings.v1.Setting.int_value:type_name -> ocis.messages.settings.v1.Int - 11, // 7: ocis.messages.settings.v1.Setting.string_value:type_name -> ocis.messages.settings.v1.String - 12, // 8: ocis.messages.settings.v1.Setting.bool_value:type_name -> ocis.messages.settings.v1.Bool - 13, // 9: ocis.messages.settings.v1.Setting.single_choice_value:type_name -> ocis.messages.settings.v1.SingleChoiceList - 14, // 10: ocis.messages.settings.v1.Setting.multi_choice_value:type_name -> ocis.messages.settings.v1.MultiChoiceList - 16, // 11: ocis.messages.settings.v1.Setting.permission_value:type_name -> ocis.messages.settings.v1.Permission - 7, // 12: ocis.messages.settings.v1.Setting.resource:type_name -> ocis.messages.settings.v1.Resource - 15, // 13: ocis.messages.settings.v1.SingleChoiceList.options:type_name -> ocis.messages.settings.v1.ListOption - 15, // 14: ocis.messages.settings.v1.MultiChoiceList.options:type_name -> ocis.messages.settings.v1.ListOption - 19, // 15: ocis.messages.settings.v1.ListOption.value:type_name -> ocis.messages.settings.v1.ListOptionValue - 2, // 16: ocis.messages.settings.v1.Permission.operation:type_name -> ocis.messages.settings.v1.Permission.Operation - 3, // 17: ocis.messages.settings.v1.Permission.constraint:type_name -> ocis.messages.settings.v1.Permission.Constraint - 7, // 18: ocis.messages.settings.v1.Value.resource:type_name -> ocis.messages.settings.v1.Resource - 18, // 19: ocis.messages.settings.v1.Value.list_value:type_name -> ocis.messages.settings.v1.ListValue - 19, // 20: ocis.messages.settings.v1.ListValue.values:type_name -> ocis.messages.settings.v1.ListOptionValue + return file_ocis_messages_settings_v0_settings_proto_rawDescData +} + +var file_ocis_messages_settings_v0_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_ocis_messages_settings_v0_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_ocis_messages_settings_v0_settings_proto_goTypes = []interface{}{ + (Resource_Type)(0), // 0: ocis.messages.settings.v0.Resource.Type + (Bundle_Type)(0), // 1: ocis.messages.settings.v0.Bundle.Type + (Permission_Operation)(0), // 2: ocis.messages.settings.v0.Permission.Operation + (Permission_Constraint)(0), // 3: ocis.messages.settings.v0.Permission.Constraint + (*ValueWithIdentifier)(nil), // 4: ocis.messages.settings.v0.ValueWithIdentifier + (*Identifier)(nil), // 5: ocis.messages.settings.v0.Identifier + (*UserRoleAssignment)(nil), // 6: ocis.messages.settings.v0.UserRoleAssignment + (*Resource)(nil), // 7: ocis.messages.settings.v0.Resource + (*Bundle)(nil), // 8: ocis.messages.settings.v0.Bundle + (*Setting)(nil), // 9: ocis.messages.settings.v0.Setting + (*Int)(nil), // 10: ocis.messages.settings.v0.Int + (*String)(nil), // 11: ocis.messages.settings.v0.String + (*Bool)(nil), // 12: ocis.messages.settings.v0.Bool + (*SingleChoiceList)(nil), // 13: ocis.messages.settings.v0.SingleChoiceList + (*MultiChoiceList)(nil), // 14: ocis.messages.settings.v0.MultiChoiceList + (*ListOption)(nil), // 15: ocis.messages.settings.v0.ListOption + (*Permission)(nil), // 16: ocis.messages.settings.v0.Permission + (*Value)(nil), // 17: ocis.messages.settings.v0.Value + (*ListValue)(nil), // 18: ocis.messages.settings.v0.ListValue + (*ListOptionValue)(nil), // 19: ocis.messages.settings.v0.ListOptionValue +} +var file_ocis_messages_settings_v0_settings_proto_depIdxs = []int32{ + 5, // 0: ocis.messages.settings.v0.ValueWithIdentifier.identifier:type_name -> ocis.messages.settings.v0.Identifier + 17, // 1: ocis.messages.settings.v0.ValueWithIdentifier.value:type_name -> ocis.messages.settings.v0.Value + 0, // 2: ocis.messages.settings.v0.Resource.type:type_name -> ocis.messages.settings.v0.Resource.Type + 1, // 3: ocis.messages.settings.v0.Bundle.type:type_name -> ocis.messages.settings.v0.Bundle.Type + 9, // 4: ocis.messages.settings.v0.Bundle.settings:type_name -> ocis.messages.settings.v0.Setting + 7, // 5: ocis.messages.settings.v0.Bundle.resource:type_name -> ocis.messages.settings.v0.Resource + 10, // 6: ocis.messages.settings.v0.Setting.int_value:type_name -> ocis.messages.settings.v0.Int + 11, // 7: ocis.messages.settings.v0.Setting.string_value:type_name -> ocis.messages.settings.v0.String + 12, // 8: ocis.messages.settings.v0.Setting.bool_value:type_name -> ocis.messages.settings.v0.Bool + 13, // 9: ocis.messages.settings.v0.Setting.single_choice_value:type_name -> ocis.messages.settings.v0.SingleChoiceList + 14, // 10: ocis.messages.settings.v0.Setting.multi_choice_value:type_name -> ocis.messages.settings.v0.MultiChoiceList + 16, // 11: ocis.messages.settings.v0.Setting.permission_value:type_name -> ocis.messages.settings.v0.Permission + 7, // 12: ocis.messages.settings.v0.Setting.resource:type_name -> ocis.messages.settings.v0.Resource + 15, // 13: ocis.messages.settings.v0.SingleChoiceList.options:type_name -> ocis.messages.settings.v0.ListOption + 15, // 14: ocis.messages.settings.v0.MultiChoiceList.options:type_name -> ocis.messages.settings.v0.ListOption + 19, // 15: ocis.messages.settings.v0.ListOption.value:type_name -> ocis.messages.settings.v0.ListOptionValue + 2, // 16: ocis.messages.settings.v0.Permission.operation:type_name -> ocis.messages.settings.v0.Permission.Operation + 3, // 17: ocis.messages.settings.v0.Permission.constraint:type_name -> ocis.messages.settings.v0.Permission.Constraint + 7, // 18: ocis.messages.settings.v0.Value.resource:type_name -> ocis.messages.settings.v0.Resource + 18, // 19: ocis.messages.settings.v0.Value.list_value:type_name -> ocis.messages.settings.v0.ListValue + 19, // 20: ocis.messages.settings.v0.ListValue.values:type_name -> ocis.messages.settings.v0.ListOptionValue 21, // [21:21] is the sub-list for method output_type 21, // [21:21] is the sub-list for method input_type 21, // [21:21] is the sub-list for extension type_name @@ -1739,13 +1739,13 @@ var file_ocis_messages_settings_v1_settings_proto_depIdxs = []int32{ 0, // [0:21] is the sub-list for field type_name } -func init() { file_ocis_messages_settings_v1_settings_proto_init() } -func file_ocis_messages_settings_v1_settings_proto_init() { - if File_ocis_messages_settings_v1_settings_proto != nil { +func init() { file_ocis_messages_settings_v0_settings_proto_init() } +func file_ocis_messages_settings_v0_settings_proto_init() { + if File_ocis_messages_settings_v0_settings_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_messages_settings_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ValueWithIdentifier); i { case 0: return &v.state @@ -1757,7 +1757,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Identifier); i { case 0: return &v.state @@ -1769,7 +1769,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserRoleAssignment); i { case 0: return &v.state @@ -1781,7 +1781,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Resource); i { case 0: return &v.state @@ -1793,7 +1793,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bundle); i { case 0: return &v.state @@ -1805,7 +1805,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Setting); i { case 0: return &v.state @@ -1817,7 +1817,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Int); i { case 0: return &v.state @@ -1829,7 +1829,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*String); i { case 0: return &v.state @@ -1841,7 +1841,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Bool); i { case 0: return &v.state @@ -1853,7 +1853,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SingleChoiceList); i { case 0: return &v.state @@ -1865,7 +1865,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MultiChoiceList); i { case 0: return &v.state @@ -1877,7 +1877,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListOption); i { case 0: return &v.state @@ -1889,7 +1889,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Permission); i { case 0: return &v.state @@ -1901,7 +1901,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Value); i { case 0: return &v.state @@ -1913,7 +1913,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListValue); i { case 0: return &v.state @@ -1925,7 +1925,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { return nil } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_settings_v0_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListOptionValue); i { case 0: return &v.state @@ -1938,7 +1938,7 @@ func file_ocis_messages_settings_v1_settings_proto_init() { } } } - file_ocis_messages_settings_v1_settings_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_ocis_messages_settings_v0_settings_proto_msgTypes[5].OneofWrappers = []interface{}{ (*Setting_IntValue)(nil), (*Setting_StringValue)(nil), (*Setting_BoolValue)(nil), @@ -1946,13 +1946,13 @@ func file_ocis_messages_settings_v1_settings_proto_init() { (*Setting_MultiChoiceValue)(nil), (*Setting_PermissionValue)(nil), } - file_ocis_messages_settings_v1_settings_proto_msgTypes[13].OneofWrappers = []interface{}{ + file_ocis_messages_settings_v0_settings_proto_msgTypes[13].OneofWrappers = []interface{}{ (*Value_BoolValue)(nil), (*Value_IntValue)(nil), (*Value_StringValue)(nil), (*Value_ListValue)(nil), } - file_ocis_messages_settings_v1_settings_proto_msgTypes[15].OneofWrappers = []interface{}{ + file_ocis_messages_settings_v0_settings_proto_msgTypes[15].OneofWrappers = []interface{}{ (*ListOptionValue_StringValue)(nil), (*ListOptionValue_IntValue)(nil), } @@ -1960,19 +1960,19 @@ func file_ocis_messages_settings_v1_settings_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_messages_settings_v1_settings_proto_rawDesc, + RawDescriptor: file_ocis_messages_settings_v0_settings_proto_rawDesc, NumEnums: 4, NumMessages: 16, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ocis_messages_settings_v1_settings_proto_goTypes, - DependencyIndexes: file_ocis_messages_settings_v1_settings_proto_depIdxs, - EnumInfos: file_ocis_messages_settings_v1_settings_proto_enumTypes, - MessageInfos: file_ocis_messages_settings_v1_settings_proto_msgTypes, + GoTypes: file_ocis_messages_settings_v0_settings_proto_goTypes, + DependencyIndexes: file_ocis_messages_settings_v0_settings_proto_depIdxs, + EnumInfos: file_ocis_messages_settings_v0_settings_proto_enumTypes, + MessageInfos: file_ocis_messages_settings_v0_settings_proto_msgTypes, }.Build() - File_ocis_messages_settings_v1_settings_proto = out.File - file_ocis_messages_settings_v1_settings_proto_rawDesc = nil - file_ocis_messages_settings_v1_settings_proto_goTypes = nil - file_ocis_messages_settings_v1_settings_proto_depIdxs = nil + File_ocis_messages_settings_v0_settings_proto = out.File + file_ocis_messages_settings_v0_settings_proto_rawDesc = nil + file_ocis_messages_settings_v0_settings_proto_goTypes = nil + file_ocis_messages_settings_v0_settings_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go b/protogen/gen/ocis/messages/settings/v0/settings.pb.micro.go similarity index 80% rename from protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go rename to protogen/gen/ocis/messages/settings/v0/settings.pb.micro.go index 8061b393cfc..86469f1935a 100644 --- a/protogen/gen/ocis/messages/settings/v1/settings.pb.micro.go +++ b/protogen/gen/ocis/messages/settings/v0/settings.pb.micro.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/messages/settings/v1/settings.proto +// source: ocis/messages/settings/v0/settings.proto -package v1 +package v0 import ( fmt "fmt" diff --git a/protogen/gen/ocis/messages/settings/v1/settings.pb.web.go b/protogen/gen/ocis/messages/settings/v0/settings.pb.web.go similarity index 99% rename from protogen/gen/ocis/messages/settings/v1/settings.pb.web.go rename to protogen/gen/ocis/messages/settings/v0/settings.pb.web.go index b8e8615a569..71f02ed3655 100644 --- a/protogen/gen/ocis/messages/settings/v1/settings.pb.web.go +++ b/protogen/gen/ocis/messages/settings/v0/settings.pb.web.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: v1.proto +// source: v0.proto -package v1 +package v0 import ( "bytes" diff --git a/protogen/gen/ocis/messages/settings/v1/settings.swagger.json b/protogen/gen/ocis/messages/settings/v0/settings.swagger.json similarity index 92% rename from protogen/gen/ocis/messages/settings/v1/settings.swagger.json rename to protogen/gen/ocis/messages/settings/v0/settings.swagger.json index 8d47f2e103f..5c56586dde0 100644 --- a/protogen/gen/ocis/messages/settings/v1/settings.swagger.json +++ b/protogen/gen/ocis/messages/settings/v0/settings.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "ocis/messages/settings/v1/settings.proto", + "title": "ocis/messages/settings/v0/settings.proto", "version": "version not set" }, "consumes": [ diff --git a/protogen/gen/ocis/messages/store/v1/store.pb.go b/protogen/gen/ocis/messages/store/v0/store.pb.go similarity index 81% rename from protogen/gen/ocis/messages/store/v1/store.pb.go rename to protogen/gen/ocis/messages/store/v0/store.pb.go index a3d7f4ad746..1471dda61c1 100644 --- a/protogen/gen/ocis/messages/store/v1/store.pb.go +++ b/protogen/gen/ocis/messages/store/v0/store.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/messages/store/v1/store.proto +// source: ocis/messages/store/v0/store.proto -package v1 +package v0 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -34,7 +34,7 @@ type Field struct { func (x *Field) Reset() { *x = Field{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[0] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *Field) String() string { func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[0] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *Field) ProtoReflect() protoreflect.Message { // Deprecated: Use Field.ProtoReflect.Descriptor instead. func (*Field) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{0} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{0} } func (x *Field) GetType() string { @@ -95,7 +95,7 @@ type Record struct { func (x *Record) Reset() { *x = Record{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[1] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -108,7 +108,7 @@ func (x *Record) String() string { func (*Record) ProtoMessage() {} func (x *Record) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[1] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -121,7 +121,7 @@ func (x *Record) ProtoReflect() protoreflect.Message { // Deprecated: Use Record.ProtoReflect.Descriptor instead. func (*Record) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{1} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{1} } func (x *Record) GetKey() string { @@ -169,7 +169,7 @@ type ReadOptions struct { func (x *ReadOptions) Reset() { *x = ReadOptions{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[2] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +182,7 @@ func (x *ReadOptions) String() string { func (*ReadOptions) ProtoMessage() {} func (x *ReadOptions) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[2] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +195,7 @@ func (x *ReadOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadOptions.ProtoReflect.Descriptor instead. func (*ReadOptions) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{2} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{2} } func (x *ReadOptions) GetDatabase() string { @@ -263,7 +263,7 @@ type WriteOptions struct { func (x *WriteOptions) Reset() { *x = WriteOptions{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[3] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -276,7 +276,7 @@ func (x *WriteOptions) String() string { func (*WriteOptions) ProtoMessage() {} func (x *WriteOptions) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[3] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -289,7 +289,7 @@ func (x *WriteOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteOptions.ProtoReflect.Descriptor instead. func (*WriteOptions) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{3} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{3} } func (x *WriteOptions) GetDatabase() string { @@ -332,7 +332,7 @@ type DeleteOptions struct { func (x *DeleteOptions) Reset() { *x = DeleteOptions{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[4] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -345,7 +345,7 @@ func (x *DeleteOptions) String() string { func (*DeleteOptions) ProtoMessage() {} func (x *DeleteOptions) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[4] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -358,7 +358,7 @@ func (x *DeleteOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteOptions.ProtoReflect.Descriptor instead. func (*DeleteOptions) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{4} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{4} } func (x *DeleteOptions) GetDatabase() string { @@ -391,7 +391,7 @@ type ListOptions struct { func (x *ListOptions) Reset() { *x = ListOptions{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[5] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -404,7 +404,7 @@ func (x *ListOptions) String() string { func (*ListOptions) ProtoMessage() {} func (x *ListOptions) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_store_v1_store_proto_msgTypes[5] + mi := &file_ocis_messages_store_v0_store_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +417,7 @@ func (x *ListOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use ListOptions.ProtoReflect.Descriptor instead. func (*ListOptions) Descriptor() ([]byte, []int) { - return file_ocis_messages_store_v1_store_proto_rawDescGZIP(), []int{5} + return file_ocis_messages_store_v0_store_proto_rawDescGZIP(), []int{5} } func (x *ListOptions) GetDatabase() string { @@ -462,13 +462,13 @@ func (x *ListOptions) GetOffset() uint64 { return 0 } -var File_ocis_messages_store_v1_store_proto protoreflect.FileDescriptor +var File_ocis_messages_store_v0_store_proto protoreflect.FileDescriptor -var file_ocis_messages_store_v1_store_proto_rawDesc = []byte{ +var file_ocis_messages_store_v0_store_proto_rawDesc = []byte{ 0x0a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x31, 0x0a, 0x05, + 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x22, 0x31, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, @@ -479,13 +479,13 @@ var file_ocis_messages_store_v1_store_proto_rawDesc = []byte{ 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x5a, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbc, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, @@ -499,13 +499,13 @@ var file_ocis_messages_store_v1_store_proto_rawDesc = []byte{ 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x57, 0x68, 0x65, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x77, 0x68, 0x65, 0x72, 0x65, 0x1a, 0x57, 0x0a, 0x0a, 0x57, 0x68, 0x65, 0x72, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6a, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, @@ -531,38 +531,38 @@ var file_ocis_messages_store_v1_store_proto_rawDesc = []byte{ 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_ocis_messages_store_v1_store_proto_rawDescOnce sync.Once - file_ocis_messages_store_v1_store_proto_rawDescData = file_ocis_messages_store_v1_store_proto_rawDesc + file_ocis_messages_store_v0_store_proto_rawDescOnce sync.Once + file_ocis_messages_store_v0_store_proto_rawDescData = file_ocis_messages_store_v0_store_proto_rawDesc ) -func file_ocis_messages_store_v1_store_proto_rawDescGZIP() []byte { - file_ocis_messages_store_v1_store_proto_rawDescOnce.Do(func() { - file_ocis_messages_store_v1_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_store_v1_store_proto_rawDescData) +func file_ocis_messages_store_v0_store_proto_rawDescGZIP() []byte { + file_ocis_messages_store_v0_store_proto_rawDescOnce.Do(func() { + file_ocis_messages_store_v0_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_store_v0_store_proto_rawDescData) }) - return file_ocis_messages_store_v1_store_proto_rawDescData -} - -var file_ocis_messages_store_v1_store_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_ocis_messages_store_v1_store_proto_goTypes = []interface{}{ - (*Field)(nil), // 0: ocis.messages.store.v1.Field - (*Record)(nil), // 1: ocis.messages.store.v1.Record - (*ReadOptions)(nil), // 2: ocis.messages.store.v1.ReadOptions - (*WriteOptions)(nil), // 3: ocis.messages.store.v1.WriteOptions - (*DeleteOptions)(nil), // 4: ocis.messages.store.v1.DeleteOptions - (*ListOptions)(nil), // 5: ocis.messages.store.v1.ListOptions - nil, // 6: ocis.messages.store.v1.Record.MetadataEntry - nil, // 7: ocis.messages.store.v1.ReadOptions.WhereEntry -} -var file_ocis_messages_store_v1_store_proto_depIdxs = []int32{ - 6, // 0: ocis.messages.store.v1.Record.metadata:type_name -> ocis.messages.store.v1.Record.MetadataEntry - 7, // 1: ocis.messages.store.v1.ReadOptions.where:type_name -> ocis.messages.store.v1.ReadOptions.WhereEntry - 0, // 2: ocis.messages.store.v1.Record.MetadataEntry.value:type_name -> ocis.messages.store.v1.Field - 0, // 3: ocis.messages.store.v1.ReadOptions.WhereEntry.value:type_name -> ocis.messages.store.v1.Field + return file_ocis_messages_store_v0_store_proto_rawDescData +} + +var file_ocis_messages_store_v0_store_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_ocis_messages_store_v0_store_proto_goTypes = []interface{}{ + (*Field)(nil), // 0: ocis.messages.store.v0.Field + (*Record)(nil), // 1: ocis.messages.store.v0.Record + (*ReadOptions)(nil), // 2: ocis.messages.store.v0.ReadOptions + (*WriteOptions)(nil), // 3: ocis.messages.store.v0.WriteOptions + (*DeleteOptions)(nil), // 4: ocis.messages.store.v0.DeleteOptions + (*ListOptions)(nil), // 5: ocis.messages.store.v0.ListOptions + nil, // 6: ocis.messages.store.v0.Record.MetadataEntry + nil, // 7: ocis.messages.store.v0.ReadOptions.WhereEntry +} +var file_ocis_messages_store_v0_store_proto_depIdxs = []int32{ + 6, // 0: ocis.messages.store.v0.Record.metadata:type_name -> ocis.messages.store.v0.Record.MetadataEntry + 7, // 1: ocis.messages.store.v0.ReadOptions.where:type_name -> ocis.messages.store.v0.ReadOptions.WhereEntry + 0, // 2: ocis.messages.store.v0.Record.MetadataEntry.value:type_name -> ocis.messages.store.v0.Field + 0, // 3: ocis.messages.store.v0.ReadOptions.WhereEntry.value:type_name -> ocis.messages.store.v0.Field 4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method input_type 4, // [4:4] is the sub-list for extension type_name @@ -570,13 +570,13 @@ var file_ocis_messages_store_v1_store_proto_depIdxs = []int32{ 0, // [0:4] is the sub-list for field type_name } -func init() { file_ocis_messages_store_v1_store_proto_init() } -func file_ocis_messages_store_v1_store_proto_init() { - if File_ocis_messages_store_v1_store_proto != nil { +func init() { file_ocis_messages_store_v0_store_proto_init() } +func file_ocis_messages_store_v0_store_proto_init() { + if File_ocis_messages_store_v0_store_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_messages_store_v1_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Field); i { case 0: return &v.state @@ -588,7 +588,7 @@ func file_ocis_messages_store_v1_store_proto_init() { return nil } } - file_ocis_messages_store_v1_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Record); i { case 0: return &v.state @@ -600,7 +600,7 @@ func file_ocis_messages_store_v1_store_proto_init() { return nil } } - file_ocis_messages_store_v1_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReadOptions); i { case 0: return &v.state @@ -612,7 +612,7 @@ func file_ocis_messages_store_v1_store_proto_init() { return nil } } - file_ocis_messages_store_v1_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteOptions); i { case 0: return &v.state @@ -624,7 +624,7 @@ func file_ocis_messages_store_v1_store_proto_init() { return nil } } - file_ocis_messages_store_v1_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteOptions); i { case 0: return &v.state @@ -636,7 +636,7 @@ func file_ocis_messages_store_v1_store_proto_init() { return nil } } - file_ocis_messages_store_v1_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_store_v0_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListOptions); i { case 0: return &v.state @@ -653,18 +653,18 @@ func file_ocis_messages_store_v1_store_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_messages_store_v1_store_proto_rawDesc, + RawDescriptor: file_ocis_messages_store_v0_store_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ocis_messages_store_v1_store_proto_goTypes, - DependencyIndexes: file_ocis_messages_store_v1_store_proto_depIdxs, - MessageInfos: file_ocis_messages_store_v1_store_proto_msgTypes, + GoTypes: file_ocis_messages_store_v0_store_proto_goTypes, + DependencyIndexes: file_ocis_messages_store_v0_store_proto_depIdxs, + MessageInfos: file_ocis_messages_store_v0_store_proto_msgTypes, }.Build() - File_ocis_messages_store_v1_store_proto = out.File - file_ocis_messages_store_v1_store_proto_rawDesc = nil - file_ocis_messages_store_v1_store_proto_goTypes = nil - file_ocis_messages_store_v1_store_proto_depIdxs = nil + File_ocis_messages_store_v0_store_proto = out.File + file_ocis_messages_store_v0_store_proto_rawDesc = nil + file_ocis_messages_store_v0_store_proto_goTypes = nil + file_ocis_messages_store_v0_store_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/messages/store/v1/store.pb.micro.go b/protogen/gen/ocis/messages/store/v0/store.pb.micro.go similarity index 82% rename from protogen/gen/ocis/messages/store/v1/store.pb.micro.go rename to protogen/gen/ocis/messages/store/v0/store.pb.micro.go index ecdb09726fb..bbba8503986 100644 --- a/protogen/gen/ocis/messages/store/v1/store.pb.micro.go +++ b/protogen/gen/ocis/messages/store/v0/store.pb.micro.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/messages/store/v1/store.proto +// source: ocis/messages/store/v0/store.proto -package v1 +package v0 import ( fmt "fmt" diff --git a/protogen/gen/ocis/messages/store/v1/store.swagger.json b/protogen/gen/ocis/messages/store/v0/store.swagger.json similarity index 93% rename from protogen/gen/ocis/messages/store/v1/store.swagger.json rename to protogen/gen/ocis/messages/store/v0/store.swagger.json index f770774cc3b..646829b0bf7 100644 --- a/protogen/gen/ocis/messages/store/v1/store.swagger.json +++ b/protogen/gen/ocis/messages/store/v0/store.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "ocis/messages/store/v1/store.proto", + "title": "ocis/messages/store/v0/store.proto", "version": "version not set" }, "consumes": [ diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.go similarity index 76% rename from protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go rename to protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.go index f5caeb6e3ae..1fab202edf7 100644 --- a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.go +++ b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/messages/thumbnails/v1/thumbnails.proto +// source: ocis/messages/thumbnails/v0/thumbnails.proto -package v1 +package v0 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -40,7 +40,7 @@ type WebdavSource struct { func (x *WebdavSource) Reset() { *x = WebdavSource{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[0] + mi := &file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -53,7 +53,7 @@ func (x *WebdavSource) String() string { func (*WebdavSource) ProtoMessage() {} func (x *WebdavSource) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[0] + mi := &file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66,7 +66,7 @@ func (x *WebdavSource) ProtoReflect() protoreflect.Message { // Deprecated: Use WebdavSource.ProtoReflect.Descriptor instead. func (*WebdavSource) Descriptor() ([]byte, []int) { - return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0} + return file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescGZIP(), []int{0} } func (x *WebdavSource) GetUrl() string { @@ -116,7 +116,7 @@ type CS3Source struct { func (x *CS3Source) Reset() { *x = CS3Source{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[1] + mi := &file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -129,7 +129,7 @@ func (x *CS3Source) String() string { func (*CS3Source) ProtoMessage() {} func (x *CS3Source) ProtoReflect() protoreflect.Message { - mi := &file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[1] + mi := &file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -142,7 +142,7 @@ func (x *CS3Source) ProtoReflect() protoreflect.Message { // Deprecated: Use CS3Source.ProtoReflect.Descriptor instead. func (*CS3Source) Descriptor() ([]byte, []int) { - return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{1} + return file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescGZIP(), []int{1} } func (x *CS3Source) GetPath() string { @@ -159,14 +159,14 @@ func (x *CS3Source) GetAuthorization() string { return "" } -var File_ocis_messages_thumbnails_v1_thumbnails_proto protoreflect.FileDescriptor +var File_ocis_messages_thumbnails_v0_thumbnails_proto protoreflect.FileDescriptor -var file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ +var file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDesc = []byte{ 0x0a, 0x2c, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x22, 0xd4, 0x01, 0x0a, 0x0c, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x22, 0xd4, 0x01, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, @@ -188,28 +188,28 @@ var file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x30, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescOnce sync.Once - file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData = file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc + file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescOnce sync.Once + file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescData = file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDesc ) -func file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescGZIP() []byte { - file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescOnce.Do(func() { - file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData) +func file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescGZIP() []byte { + file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescOnce.Do(func() { + file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescData) }) - return file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDescData + return file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDescData } -var file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes = []interface{}{ - (*WebdavSource)(nil), // 0: ocis.messages.thumbnails.v1.WebdavSource - (*CS3Source)(nil), // 1: ocis.messages.thumbnails.v1.CS3Source +var file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ocis_messages_thumbnails_v0_thumbnails_proto_goTypes = []interface{}{ + (*WebdavSource)(nil), // 0: ocis.messages.thumbnails.v0.WebdavSource + (*CS3Source)(nil), // 1: ocis.messages.thumbnails.v0.CS3Source } -var file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs = []int32{ +var file_ocis_messages_thumbnails_v0_thumbnails_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 @@ -217,13 +217,13 @@ var file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_ocis_messages_thumbnails_v1_thumbnails_proto_init() } -func file_ocis_messages_thumbnails_v1_thumbnails_proto_init() { - if File_ocis_messages_thumbnails_v1_thumbnails_proto != nil { +func init() { file_ocis_messages_thumbnails_v0_thumbnails_proto_init() } +func file_ocis_messages_thumbnails_v0_thumbnails_proto_init() { + if File_ocis_messages_thumbnails_v0_thumbnails_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WebdavSource); i { case 0: return &v.state @@ -235,7 +235,7 @@ func file_ocis_messages_thumbnails_v1_thumbnails_proto_init() { return nil } } - file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CS3Source); i { case 0: return &v.state @@ -252,18 +252,18 @@ func file_ocis_messages_thumbnails_v1_thumbnails_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc, + RawDescriptor: file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes, - DependencyIndexes: file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs, - MessageInfos: file_ocis_messages_thumbnails_v1_thumbnails_proto_msgTypes, + GoTypes: file_ocis_messages_thumbnails_v0_thumbnails_proto_goTypes, + DependencyIndexes: file_ocis_messages_thumbnails_v0_thumbnails_proto_depIdxs, + MessageInfos: file_ocis_messages_thumbnails_v0_thumbnails_proto_msgTypes, }.Build() - File_ocis_messages_thumbnails_v1_thumbnails_proto = out.File - file_ocis_messages_thumbnails_v1_thumbnails_proto_rawDesc = nil - file_ocis_messages_thumbnails_v1_thumbnails_proto_goTypes = nil - file_ocis_messages_thumbnails_v1_thumbnails_proto_depIdxs = nil + File_ocis_messages_thumbnails_v0_thumbnails_proto = out.File + file_ocis_messages_thumbnails_v0_thumbnails_proto_rawDesc = nil + file_ocis_messages_thumbnails_v0_thumbnails_proto_goTypes = nil + file_ocis_messages_thumbnails_v0_thumbnails_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.micro.go similarity index 79% rename from protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go rename to protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.micro.go index 8e8ae50c726..70d506749bb 100644 --- a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.pb.micro.go +++ b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.pb.micro.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/messages/thumbnails/v1/thumbnails.proto +// source: ocis/messages/thumbnails/v0/thumbnails.proto -package v1 +package v0 import ( fmt "fmt" diff --git a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.swagger.json similarity index 92% rename from protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json rename to protogen/gen/ocis/messages/thumbnails/v0/thumbnails.swagger.json index 0060cf673d3..d0083e7cc14 100644 --- a/protogen/gen/ocis/messages/thumbnails/v1/thumbnails.swagger.json +++ b/protogen/gen/ocis/messages/thumbnails/v0/thumbnails.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "ocis/messages/thumbnails/v1/thumbnails.proto", + "title": "ocis/messages/thumbnails/v0/thumbnails.proto", "version": "version not set" }, "consumes": [ diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.mock.go b/protogen/gen/ocis/services/accounts/v0/accounts.mock.go similarity index 99% rename from protogen/gen/ocis/services/accounts/v1/accounts.mock.go rename to protogen/gen/ocis/services/accounts/v0/accounts.mock.go index ca3e37d0158..d5e408864c1 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.mock.go +++ b/protogen/gen/ocis/services/accounts/v0/accounts.mock.go @@ -1,9 +1,9 @@ -package v1 +package v0 import ( context "context" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" client "go-micro.dev/v4/client" empty "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go b/protogen/gen/ocis/services/accounts/v0/accounts.pb.go similarity index 80% rename from protogen/gen/ocis/services/accounts/v1/accounts.pb.go rename to protogen/gen/ocis/services/accounts/v0/accounts.pb.go index 5d3072c769e..bc4f5c54d7a 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.go +++ b/protogen/gen/ocis/services/accounts/v0/accounts.pb.go @@ -2,13 +2,13 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/services/accounts/v1/accounts.proto +// source: ocis/services/accounts/v0/accounts.proto -package v1 +package v0 import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -34,7 +34,7 @@ type RebuildIndexRequest struct { func (x *RebuildIndexRequest) Reset() { *x = RebuildIndexRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[0] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *RebuildIndexRequest) String() string { func (*RebuildIndexRequest) ProtoMessage() {} func (x *RebuildIndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[0] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *RebuildIndexRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RebuildIndexRequest.ProtoReflect.Descriptor instead. func (*RebuildIndexRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{0} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{0} } type RebuildIndexResponse struct { @@ -72,7 +72,7 @@ type RebuildIndexResponse struct { func (x *RebuildIndexResponse) Reset() { *x = RebuildIndexResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[1] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -85,7 +85,7 @@ func (x *RebuildIndexResponse) String() string { func (*RebuildIndexResponse) ProtoMessage() {} func (x *RebuildIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[1] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -98,7 +98,7 @@ func (x *RebuildIndexResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RebuildIndexResponse.ProtoReflect.Descriptor instead. func (*RebuildIndexResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{1} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{1} } type ListAccountsRequest struct { @@ -140,7 +140,7 @@ type ListAccountsRequest struct { func (x *ListAccountsRequest) Reset() { *x = ListAccountsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[2] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -153,7 +153,7 @@ func (x *ListAccountsRequest) String() string { func (*ListAccountsRequest) ProtoMessage() {} func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[2] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -166,7 +166,7 @@ func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead. func (*ListAccountsRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{2} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{2} } func (x *ListAccountsRequest) GetPageSize() int32 { @@ -205,7 +205,7 @@ type ListAccountsResponse struct { // The field name should match the noun "accounts" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - Accounts []*v1.Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` + Accounts []*v0.Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // Token to retrieve the next page of results, or empty if there are no // more results in the list NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` @@ -214,7 +214,7 @@ type ListAccountsResponse struct { func (x *ListAccountsResponse) Reset() { *x = ListAccountsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[3] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -227,7 +227,7 @@ func (x *ListAccountsResponse) String() string { func (*ListAccountsResponse) ProtoMessage() {} func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[3] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -240,10 +240,10 @@ func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead. func (*ListAccountsResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{3} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{3} } -func (x *ListAccountsResponse) GetAccounts() []*v1.Account { +func (x *ListAccountsResponse) GetAccounts() []*v0.Account { if x != nil { return x.Accounts } @@ -268,7 +268,7 @@ type GetAccountRequest struct { func (x *GetAccountRequest) Reset() { *x = GetAccountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[4] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -281,7 +281,7 @@ func (x *GetAccountRequest) String() string { func (*GetAccountRequest) ProtoMessage() {} func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[4] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -294,7 +294,7 @@ func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{4} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{4} } func (x *GetAccountRequest) GetId() string { @@ -310,13 +310,13 @@ type CreateAccountRequest struct { unknownFields protoimpl.UnknownFields // The account resource to create - Account *v1.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Account *v0.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` } func (x *CreateAccountRequest) Reset() { *x = CreateAccountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[5] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -329,7 +329,7 @@ func (x *CreateAccountRequest) String() string { func (*CreateAccountRequest) ProtoMessage() {} func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[5] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -342,10 +342,10 @@ func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead. func (*CreateAccountRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{5} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{5} } -func (x *CreateAccountRequest) GetAccount() *v1.Account { +func (x *CreateAccountRequest) GetAccount() *v0.Account { if x != nil { return x.Account } @@ -358,7 +358,7 @@ type UpdateAccountRequest struct { unknownFields protoimpl.UnknownFields // The account resource which replaces the resource on the server - Account *v1.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Account *v0.Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` @@ -367,7 +367,7 @@ type UpdateAccountRequest struct { func (x *UpdateAccountRequest) Reset() { *x = UpdateAccountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[6] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -380,7 +380,7 @@ func (x *UpdateAccountRequest) String() string { func (*UpdateAccountRequest) ProtoMessage() {} func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[6] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -393,10 +393,10 @@ func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead. func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{6} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{6} } -func (x *UpdateAccountRequest) GetAccount() *v1.Account { +func (x *UpdateAccountRequest) GetAccount() *v0.Account { if x != nil { return x.Account } @@ -421,7 +421,7 @@ type DeleteAccountRequest struct { func (x *DeleteAccountRequest) Reset() { *x = DeleteAccountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[7] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -434,7 +434,7 @@ func (x *DeleteAccountRequest) String() string { func (*DeleteAccountRequest) ProtoMessage() {} func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[7] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -447,7 +447,7 @@ func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{7} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{7} } func (x *DeleteAccountRequest) GetId() string { @@ -494,7 +494,7 @@ type ListGroupsRequest struct { func (x *ListGroupsRequest) Reset() { *x = ListGroupsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[8] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -507,7 +507,7 @@ func (x *ListGroupsRequest) String() string { func (*ListGroupsRequest) ProtoMessage() {} func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[8] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -520,7 +520,7 @@ func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGroupsRequest.ProtoReflect.Descriptor instead. func (*ListGroupsRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{8} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{8} } func (x *ListGroupsRequest) GetPageSize() int32 { @@ -559,7 +559,7 @@ type ListGroupsResponse struct { // The field name should match the noun "group" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - Groups []*v1.Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + Groups []*v0.Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` // Token to retrieve the next page of results, or empty if there are no // more results in the list NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` @@ -568,7 +568,7 @@ type ListGroupsResponse struct { func (x *ListGroupsResponse) Reset() { *x = ListGroupsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[9] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -581,7 +581,7 @@ func (x *ListGroupsResponse) String() string { func (*ListGroupsResponse) ProtoMessage() {} func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[9] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -594,10 +594,10 @@ func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListGroupsResponse.ProtoReflect.Descriptor instead. func (*ListGroupsResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{9} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{9} } -func (x *ListGroupsResponse) GetGroups() []*v1.Group { +func (x *ListGroupsResponse) GetGroups() []*v0.Group { if x != nil { return x.Groups } @@ -622,7 +622,7 @@ type GetGroupRequest struct { func (x *GetGroupRequest) Reset() { *x = GetGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[10] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -635,7 +635,7 @@ func (x *GetGroupRequest) String() string { func (*GetGroupRequest) ProtoMessage() {} func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[10] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -648,7 +648,7 @@ func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. func (*GetGroupRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{10} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{10} } func (x *GetGroupRequest) GetId() string { @@ -664,13 +664,13 @@ type CreateGroupRequest struct { unknownFields protoimpl.UnknownFields // The account resource to create - Group *v1.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Group *v0.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` } func (x *CreateGroupRequest) Reset() { *x = CreateGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[11] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -683,7 +683,7 @@ func (x *CreateGroupRequest) String() string { func (*CreateGroupRequest) ProtoMessage() {} func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[11] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -696,10 +696,10 @@ func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateGroupRequest.ProtoReflect.Descriptor instead. func (*CreateGroupRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{11} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{11} } -func (x *CreateGroupRequest) GetGroup() *v1.Group { +func (x *CreateGroupRequest) GetGroup() *v0.Group { if x != nil { return x.Group } @@ -712,7 +712,7 @@ type UpdateGroupRequest struct { unknownFields protoimpl.UnknownFields // The group resource which replaces the resource on the server - Group *v1.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Group *v0.Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` @@ -721,7 +721,7 @@ type UpdateGroupRequest struct { func (x *UpdateGroupRequest) Reset() { *x = UpdateGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[12] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -734,7 +734,7 @@ func (x *UpdateGroupRequest) String() string { func (*UpdateGroupRequest) ProtoMessage() {} func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[12] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -747,10 +747,10 @@ func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{12} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{12} } -func (x *UpdateGroupRequest) GetGroup() *v1.Group { +func (x *UpdateGroupRequest) GetGroup() *v0.Group { if x != nil { return x.Group } @@ -775,7 +775,7 @@ type DeleteGroupRequest struct { func (x *DeleteGroupRequest) Reset() { *x = DeleteGroupRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[13] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -788,7 +788,7 @@ func (x *DeleteGroupRequest) String() string { func (*DeleteGroupRequest) ProtoMessage() {} func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[13] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -801,7 +801,7 @@ func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead. func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{13} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{13} } func (x *DeleteGroupRequest) GetId() string { @@ -825,7 +825,7 @@ type AddMemberRequest struct { func (x *AddMemberRequest) Reset() { *x = AddMemberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[14] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -838,7 +838,7 @@ func (x *AddMemberRequest) String() string { func (*AddMemberRequest) ProtoMessage() {} func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[14] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -851,7 +851,7 @@ func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddMemberRequest.ProtoReflect.Descriptor instead. func (*AddMemberRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{14} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{14} } func (x *AddMemberRequest) GetGroupId() string { @@ -882,7 +882,7 @@ type RemoveMemberRequest struct { func (x *RemoveMemberRequest) Reset() { *x = RemoveMemberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[15] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -895,7 +895,7 @@ func (x *RemoveMemberRequest) String() string { func (*RemoveMemberRequest) ProtoMessage() {} func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[15] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -908,7 +908,7 @@ func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveMemberRequest.ProtoReflect.Descriptor instead. func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{15} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{15} } func (x *RemoveMemberRequest) GetGroupId() string { @@ -963,7 +963,7 @@ type ListMembersRequest struct { func (x *ListMembersRequest) Reset() { *x = ListMembersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[16] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -976,7 +976,7 @@ func (x *ListMembersRequest) String() string { func (*ListMembersRequest) ProtoMessage() {} func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[16] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -989,7 +989,7 @@ func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. func (*ListMembersRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{16} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{16} } func (x *ListMembersRequest) GetPageSize() int32 { @@ -1035,7 +1035,7 @@ type ListMembersResponse struct { // The field name should match the noun "members" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - Members []*v1.Account `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + Members []*v0.Account `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` // Token to retrieve the next page of results, or empty if there are no // more results in the list NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` @@ -1044,7 +1044,7 @@ type ListMembersResponse struct { func (x *ListMembersResponse) Reset() { *x = ListMembersResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[17] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1057,7 +1057,7 @@ func (x *ListMembersResponse) String() string { func (*ListMembersResponse) ProtoMessage() {} func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_accounts_v1_accounts_proto_msgTypes[17] + mi := &file_ocis_services_accounts_v0_accounts_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1070,10 +1070,10 @@ func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. func (*ListMembersResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP(), []int{17} + return file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP(), []int{17} } -func (x *ListMembersResponse) GetMembers() []*v1.Account { +func (x *ListMembersResponse) GetMembers() []*v0.Account { if x != nil { return x.Members } @@ -1087,15 +1087,15 @@ func (x *ListMembersResponse) GetNextPageToken() string { return "" } -var File_ocis_services_accounts_v1_accounts_proto protoreflect.FileDescriptor +var File_ocis_services_accounts_v0_accounts_proto protoreflect.FileDescriptor -var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ +var file_ocis_services_accounts_v0_accounts_proto_rawDesc = []byte{ 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, + 0x74, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -1126,7 +1126,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, @@ -1136,13 +1136,13 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 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, @@ -1165,7 +1165,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, + 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, @@ -1174,12 +1174,12 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, @@ -1213,51 +1213,51 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, + 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xe9, 0x05, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x88, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, @@ -1267,42 +1267,42 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x75, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, + 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, @@ -1310,29 +1310,29 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, + 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0x9b, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, @@ -1340,10 +1340,10 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x32, 0xa2, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, @@ -1351,7 +1351,7 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x76, 0x69, 0x6c, 0x6c, 0x61, 0x66, 0x61, 0x6e, 0x65, 0x7a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x74, 0x65, 0x73, 0x74, 0x30, 0x30, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x92, 0x41, 0xa0, 0x02, 0x12, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x30, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, @@ -1374,83 +1374,83 @@ var file_ocis_services_accounts_v1_accounts_proto_rawDesc = []byte{ } var ( - file_ocis_services_accounts_v1_accounts_proto_rawDescOnce sync.Once - file_ocis_services_accounts_v1_accounts_proto_rawDescData = file_ocis_services_accounts_v1_accounts_proto_rawDesc + file_ocis_services_accounts_v0_accounts_proto_rawDescOnce sync.Once + file_ocis_services_accounts_v0_accounts_proto_rawDescData = file_ocis_services_accounts_v0_accounts_proto_rawDesc ) -func file_ocis_services_accounts_v1_accounts_proto_rawDescGZIP() []byte { - file_ocis_services_accounts_v1_accounts_proto_rawDescOnce.Do(func() { - file_ocis_services_accounts_v1_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_accounts_v1_accounts_proto_rawDescData) +func file_ocis_services_accounts_v0_accounts_proto_rawDescGZIP() []byte { + file_ocis_services_accounts_v0_accounts_proto_rawDescOnce.Do(func() { + file_ocis_services_accounts_v0_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_accounts_v0_accounts_proto_rawDescData) }) - return file_ocis_services_accounts_v1_accounts_proto_rawDescData -} - -var file_ocis_services_accounts_v1_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_ocis_services_accounts_v1_accounts_proto_goTypes = []interface{}{ - (*RebuildIndexRequest)(nil), // 0: ocis.services.accounts.v1.RebuildIndexRequest - (*RebuildIndexResponse)(nil), // 1: ocis.services.accounts.v1.RebuildIndexResponse - (*ListAccountsRequest)(nil), // 2: ocis.services.accounts.v1.ListAccountsRequest - (*ListAccountsResponse)(nil), // 3: ocis.services.accounts.v1.ListAccountsResponse - (*GetAccountRequest)(nil), // 4: ocis.services.accounts.v1.GetAccountRequest - (*CreateAccountRequest)(nil), // 5: ocis.services.accounts.v1.CreateAccountRequest - (*UpdateAccountRequest)(nil), // 6: ocis.services.accounts.v1.UpdateAccountRequest - (*DeleteAccountRequest)(nil), // 7: ocis.services.accounts.v1.DeleteAccountRequest - (*ListGroupsRequest)(nil), // 8: ocis.services.accounts.v1.ListGroupsRequest - (*ListGroupsResponse)(nil), // 9: ocis.services.accounts.v1.ListGroupsResponse - (*GetGroupRequest)(nil), // 10: ocis.services.accounts.v1.GetGroupRequest - (*CreateGroupRequest)(nil), // 11: ocis.services.accounts.v1.CreateGroupRequest - (*UpdateGroupRequest)(nil), // 12: ocis.services.accounts.v1.UpdateGroupRequest - (*DeleteGroupRequest)(nil), // 13: ocis.services.accounts.v1.DeleteGroupRequest - (*AddMemberRequest)(nil), // 14: ocis.services.accounts.v1.AddMemberRequest - (*RemoveMemberRequest)(nil), // 15: ocis.services.accounts.v1.RemoveMemberRequest - (*ListMembersRequest)(nil), // 16: ocis.services.accounts.v1.ListMembersRequest - (*ListMembersResponse)(nil), // 17: ocis.services.accounts.v1.ListMembersResponse + return file_ocis_services_accounts_v0_accounts_proto_rawDescData +} + +var file_ocis_services_accounts_v0_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_ocis_services_accounts_v0_accounts_proto_goTypes = []interface{}{ + (*RebuildIndexRequest)(nil), // 0: ocis.services.accounts.v0.RebuildIndexRequest + (*RebuildIndexResponse)(nil), // 1: ocis.services.accounts.v0.RebuildIndexResponse + (*ListAccountsRequest)(nil), // 2: ocis.services.accounts.v0.ListAccountsRequest + (*ListAccountsResponse)(nil), // 3: ocis.services.accounts.v0.ListAccountsResponse + (*GetAccountRequest)(nil), // 4: ocis.services.accounts.v0.GetAccountRequest + (*CreateAccountRequest)(nil), // 5: ocis.services.accounts.v0.CreateAccountRequest + (*UpdateAccountRequest)(nil), // 6: ocis.services.accounts.v0.UpdateAccountRequest + (*DeleteAccountRequest)(nil), // 7: ocis.services.accounts.v0.DeleteAccountRequest + (*ListGroupsRequest)(nil), // 8: ocis.services.accounts.v0.ListGroupsRequest + (*ListGroupsResponse)(nil), // 9: ocis.services.accounts.v0.ListGroupsResponse + (*GetGroupRequest)(nil), // 10: ocis.services.accounts.v0.GetGroupRequest + (*CreateGroupRequest)(nil), // 11: ocis.services.accounts.v0.CreateGroupRequest + (*UpdateGroupRequest)(nil), // 12: ocis.services.accounts.v0.UpdateGroupRequest + (*DeleteGroupRequest)(nil), // 13: ocis.services.accounts.v0.DeleteGroupRequest + (*AddMemberRequest)(nil), // 14: ocis.services.accounts.v0.AddMemberRequest + (*RemoveMemberRequest)(nil), // 15: ocis.services.accounts.v0.RemoveMemberRequest + (*ListMembersRequest)(nil), // 16: ocis.services.accounts.v0.ListMembersRequest + (*ListMembersResponse)(nil), // 17: ocis.services.accounts.v0.ListMembersResponse (*fieldmaskpb.FieldMask)(nil), // 18: google.protobuf.FieldMask - (*v1.Account)(nil), // 19: ocis.messages.accounts.v1.Account - (*v1.Group)(nil), // 20: ocis.messages.accounts.v1.Group + (*v0.Account)(nil), // 19: ocis.messages.accounts.v0.Account + (*v0.Group)(nil), // 20: ocis.messages.accounts.v0.Group (*emptypb.Empty)(nil), // 21: google.protobuf.Empty } -var file_ocis_services_accounts_v1_accounts_proto_depIdxs = []int32{ - 18, // 0: ocis.services.accounts.v1.ListAccountsRequest.field_mask:type_name -> google.protobuf.FieldMask - 19, // 1: ocis.services.accounts.v1.ListAccountsResponse.accounts:type_name -> ocis.messages.accounts.v1.Account - 19, // 2: ocis.services.accounts.v1.CreateAccountRequest.account:type_name -> ocis.messages.accounts.v1.Account - 19, // 3: ocis.services.accounts.v1.UpdateAccountRequest.account:type_name -> ocis.messages.accounts.v1.Account - 18, // 4: ocis.services.accounts.v1.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask - 18, // 5: ocis.services.accounts.v1.ListGroupsRequest.field_mask:type_name -> google.protobuf.FieldMask - 20, // 6: ocis.services.accounts.v1.ListGroupsResponse.groups:type_name -> ocis.messages.accounts.v1.Group - 20, // 7: ocis.services.accounts.v1.CreateGroupRequest.group:type_name -> ocis.messages.accounts.v1.Group - 20, // 8: ocis.services.accounts.v1.UpdateGroupRequest.group:type_name -> ocis.messages.accounts.v1.Group - 18, // 9: ocis.services.accounts.v1.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask - 18, // 10: ocis.services.accounts.v1.ListMembersRequest.field_mask:type_name -> google.protobuf.FieldMask - 19, // 11: ocis.services.accounts.v1.ListMembersResponse.members:type_name -> ocis.messages.accounts.v1.Account - 2, // 12: ocis.services.accounts.v1.AccountsService.ListAccounts:input_type -> ocis.services.accounts.v1.ListAccountsRequest - 4, // 13: ocis.services.accounts.v1.AccountsService.GetAccount:input_type -> ocis.services.accounts.v1.GetAccountRequest - 5, // 14: ocis.services.accounts.v1.AccountsService.CreateAccount:input_type -> ocis.services.accounts.v1.CreateAccountRequest - 6, // 15: ocis.services.accounts.v1.AccountsService.UpdateAccount:input_type -> ocis.services.accounts.v1.UpdateAccountRequest - 7, // 16: ocis.services.accounts.v1.AccountsService.DeleteAccount:input_type -> ocis.services.accounts.v1.DeleteAccountRequest - 8, // 17: ocis.services.accounts.v1.GroupsService.ListGroups:input_type -> ocis.services.accounts.v1.ListGroupsRequest - 10, // 18: ocis.services.accounts.v1.GroupsService.GetGroup:input_type -> ocis.services.accounts.v1.GetGroupRequest - 11, // 19: ocis.services.accounts.v1.GroupsService.CreateGroup:input_type -> ocis.services.accounts.v1.CreateGroupRequest - 12, // 20: ocis.services.accounts.v1.GroupsService.UpdateGroup:input_type -> ocis.services.accounts.v1.UpdateGroupRequest - 13, // 21: ocis.services.accounts.v1.GroupsService.DeleteGroup:input_type -> ocis.services.accounts.v1.DeleteGroupRequest - 14, // 22: ocis.services.accounts.v1.GroupsService.AddMember:input_type -> ocis.services.accounts.v1.AddMemberRequest - 15, // 23: ocis.services.accounts.v1.GroupsService.RemoveMember:input_type -> ocis.services.accounts.v1.RemoveMemberRequest - 16, // 24: ocis.services.accounts.v1.GroupsService.ListMembers:input_type -> ocis.services.accounts.v1.ListMembersRequest - 0, // 25: ocis.services.accounts.v1.IndexService.RebuildIndex:input_type -> ocis.services.accounts.v1.RebuildIndexRequest - 3, // 26: ocis.services.accounts.v1.AccountsService.ListAccounts:output_type -> ocis.services.accounts.v1.ListAccountsResponse - 19, // 27: ocis.services.accounts.v1.AccountsService.GetAccount:output_type -> ocis.messages.accounts.v1.Account - 19, // 28: ocis.services.accounts.v1.AccountsService.CreateAccount:output_type -> ocis.messages.accounts.v1.Account - 19, // 29: ocis.services.accounts.v1.AccountsService.UpdateAccount:output_type -> ocis.messages.accounts.v1.Account - 21, // 30: ocis.services.accounts.v1.AccountsService.DeleteAccount:output_type -> google.protobuf.Empty - 9, // 31: ocis.services.accounts.v1.GroupsService.ListGroups:output_type -> ocis.services.accounts.v1.ListGroupsResponse - 20, // 32: ocis.services.accounts.v1.GroupsService.GetGroup:output_type -> ocis.messages.accounts.v1.Group - 20, // 33: ocis.services.accounts.v1.GroupsService.CreateGroup:output_type -> ocis.messages.accounts.v1.Group - 20, // 34: ocis.services.accounts.v1.GroupsService.UpdateGroup:output_type -> ocis.messages.accounts.v1.Group - 21, // 35: ocis.services.accounts.v1.GroupsService.DeleteGroup:output_type -> google.protobuf.Empty - 20, // 36: ocis.services.accounts.v1.GroupsService.AddMember:output_type -> ocis.messages.accounts.v1.Group - 20, // 37: ocis.services.accounts.v1.GroupsService.RemoveMember:output_type -> ocis.messages.accounts.v1.Group - 17, // 38: ocis.services.accounts.v1.GroupsService.ListMembers:output_type -> ocis.services.accounts.v1.ListMembersResponse - 1, // 39: ocis.services.accounts.v1.IndexService.RebuildIndex:output_type -> ocis.services.accounts.v1.RebuildIndexResponse +var file_ocis_services_accounts_v0_accounts_proto_depIdxs = []int32{ + 18, // 0: ocis.services.accounts.v0.ListAccountsRequest.field_mask:type_name -> google.protobuf.FieldMask + 19, // 1: ocis.services.accounts.v0.ListAccountsResponse.accounts:type_name -> ocis.messages.accounts.v0.Account + 19, // 2: ocis.services.accounts.v0.CreateAccountRequest.account:type_name -> ocis.messages.accounts.v0.Account + 19, // 3: ocis.services.accounts.v0.UpdateAccountRequest.account:type_name -> ocis.messages.accounts.v0.Account + 18, // 4: ocis.services.accounts.v0.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 5: ocis.services.accounts.v0.ListGroupsRequest.field_mask:type_name -> google.protobuf.FieldMask + 20, // 6: ocis.services.accounts.v0.ListGroupsResponse.groups:type_name -> ocis.messages.accounts.v0.Group + 20, // 7: ocis.services.accounts.v0.CreateGroupRequest.group:type_name -> ocis.messages.accounts.v0.Group + 20, // 8: ocis.services.accounts.v0.UpdateGroupRequest.group:type_name -> ocis.messages.accounts.v0.Group + 18, // 9: ocis.services.accounts.v0.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 10: ocis.services.accounts.v0.ListMembersRequest.field_mask:type_name -> google.protobuf.FieldMask + 19, // 11: ocis.services.accounts.v0.ListMembersResponse.members:type_name -> ocis.messages.accounts.v0.Account + 2, // 12: ocis.services.accounts.v0.AccountsService.ListAccounts:input_type -> ocis.services.accounts.v0.ListAccountsRequest + 4, // 13: ocis.services.accounts.v0.AccountsService.GetAccount:input_type -> ocis.services.accounts.v0.GetAccountRequest + 5, // 14: ocis.services.accounts.v0.AccountsService.CreateAccount:input_type -> ocis.services.accounts.v0.CreateAccountRequest + 6, // 15: ocis.services.accounts.v0.AccountsService.UpdateAccount:input_type -> ocis.services.accounts.v0.UpdateAccountRequest + 7, // 16: ocis.services.accounts.v0.AccountsService.DeleteAccount:input_type -> ocis.services.accounts.v0.DeleteAccountRequest + 8, // 17: ocis.services.accounts.v0.GroupsService.ListGroups:input_type -> ocis.services.accounts.v0.ListGroupsRequest + 10, // 18: ocis.services.accounts.v0.GroupsService.GetGroup:input_type -> ocis.services.accounts.v0.GetGroupRequest + 11, // 19: ocis.services.accounts.v0.GroupsService.CreateGroup:input_type -> ocis.services.accounts.v0.CreateGroupRequest + 12, // 20: ocis.services.accounts.v0.GroupsService.UpdateGroup:input_type -> ocis.services.accounts.v0.UpdateGroupRequest + 13, // 21: ocis.services.accounts.v0.GroupsService.DeleteGroup:input_type -> ocis.services.accounts.v0.DeleteGroupRequest + 14, // 22: ocis.services.accounts.v0.GroupsService.AddMember:input_type -> ocis.services.accounts.v0.AddMemberRequest + 15, // 23: ocis.services.accounts.v0.GroupsService.RemoveMember:input_type -> ocis.services.accounts.v0.RemoveMemberRequest + 16, // 24: ocis.services.accounts.v0.GroupsService.ListMembers:input_type -> ocis.services.accounts.v0.ListMembersRequest + 0, // 25: ocis.services.accounts.v0.IndexService.RebuildIndex:input_type -> ocis.services.accounts.v0.RebuildIndexRequest + 3, // 26: ocis.services.accounts.v0.AccountsService.ListAccounts:output_type -> ocis.services.accounts.v0.ListAccountsResponse + 19, // 27: ocis.services.accounts.v0.AccountsService.GetAccount:output_type -> ocis.messages.accounts.v0.Account + 19, // 28: ocis.services.accounts.v0.AccountsService.CreateAccount:output_type -> ocis.messages.accounts.v0.Account + 19, // 29: ocis.services.accounts.v0.AccountsService.UpdateAccount:output_type -> ocis.messages.accounts.v0.Account + 21, // 30: ocis.services.accounts.v0.AccountsService.DeleteAccount:output_type -> google.protobuf.Empty + 9, // 31: ocis.services.accounts.v0.GroupsService.ListGroups:output_type -> ocis.services.accounts.v0.ListGroupsResponse + 20, // 32: ocis.services.accounts.v0.GroupsService.GetGroup:output_type -> ocis.messages.accounts.v0.Group + 20, // 33: ocis.services.accounts.v0.GroupsService.CreateGroup:output_type -> ocis.messages.accounts.v0.Group + 20, // 34: ocis.services.accounts.v0.GroupsService.UpdateGroup:output_type -> ocis.messages.accounts.v0.Group + 21, // 35: ocis.services.accounts.v0.GroupsService.DeleteGroup:output_type -> google.protobuf.Empty + 20, // 36: ocis.services.accounts.v0.GroupsService.AddMember:output_type -> ocis.messages.accounts.v0.Group + 20, // 37: ocis.services.accounts.v0.GroupsService.RemoveMember:output_type -> ocis.messages.accounts.v0.Group + 17, // 38: ocis.services.accounts.v0.GroupsService.ListMembers:output_type -> ocis.services.accounts.v0.ListMembersResponse + 1, // 39: ocis.services.accounts.v0.IndexService.RebuildIndex:output_type -> ocis.services.accounts.v0.RebuildIndexResponse 26, // [26:40] is the sub-list for method output_type 12, // [12:26] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name @@ -1458,13 +1458,13 @@ var file_ocis_services_accounts_v1_accounts_proto_depIdxs = []int32{ 0, // [0:12] is the sub-list for field type_name } -func init() { file_ocis_services_accounts_v1_accounts_proto_init() } -func file_ocis_services_accounts_v1_accounts_proto_init() { - if File_ocis_services_accounts_v1_accounts_proto != nil { +func init() { file_ocis_services_accounts_v0_accounts_proto_init() } +func file_ocis_services_accounts_v0_accounts_proto_init() { + if File_ocis_services_accounts_v0_accounts_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_services_accounts_v1_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RebuildIndexRequest); i { case 0: return &v.state @@ -1476,7 +1476,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RebuildIndexResponse); i { case 0: return &v.state @@ -1488,7 +1488,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListAccountsRequest); i { case 0: return &v.state @@ -1500,7 +1500,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListAccountsResponse); i { case 0: return &v.state @@ -1512,7 +1512,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAccountRequest); i { case 0: return &v.state @@ -1524,7 +1524,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateAccountRequest); i { case 0: return &v.state @@ -1536,7 +1536,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateAccountRequest); i { case 0: return &v.state @@ -1548,7 +1548,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteAccountRequest); i { case 0: return &v.state @@ -1560,7 +1560,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListGroupsRequest); i { case 0: return &v.state @@ -1572,7 +1572,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListGroupsResponse); i { case 0: return &v.state @@ -1584,7 +1584,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetGroupRequest); i { case 0: return &v.state @@ -1596,7 +1596,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateGroupRequest); i { case 0: return &v.state @@ -1608,7 +1608,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateGroupRequest); i { case 0: return &v.state @@ -1620,7 +1620,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteGroupRequest); i { case 0: return &v.state @@ -1632,7 +1632,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddMemberRequest); i { case 0: return &v.state @@ -1644,7 +1644,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveMemberRequest); i { case 0: return &v.state @@ -1656,7 +1656,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMembersRequest); i { case 0: return &v.state @@ -1668,7 +1668,7 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { return nil } } - file_ocis_services_accounts_v1_accounts_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_accounts_v0_accounts_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListMembersResponse); i { case 0: return &v.state @@ -1685,18 +1685,18 @@ func file_ocis_services_accounts_v1_accounts_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_services_accounts_v1_accounts_proto_rawDesc, + RawDescriptor: file_ocis_services_accounts_v0_accounts_proto_rawDesc, NumEnums: 0, NumMessages: 18, NumExtensions: 0, NumServices: 3, }, - GoTypes: file_ocis_services_accounts_v1_accounts_proto_goTypes, - DependencyIndexes: file_ocis_services_accounts_v1_accounts_proto_depIdxs, - MessageInfos: file_ocis_services_accounts_v1_accounts_proto_msgTypes, + GoTypes: file_ocis_services_accounts_v0_accounts_proto_goTypes, + DependencyIndexes: file_ocis_services_accounts_v0_accounts_proto_depIdxs, + MessageInfos: file_ocis_services_accounts_v0_accounts_proto_msgTypes, }.Build() - File_ocis_services_accounts_v1_accounts_proto = out.File - file_ocis_services_accounts_v1_accounts_proto_rawDesc = nil - file_ocis_services_accounts_v1_accounts_proto_goTypes = nil - file_ocis_services_accounts_v1_accounts_proto_depIdxs = nil + File_ocis_services_accounts_v0_accounts_proto = out.File + file_ocis_services_accounts_v0_accounts_proto_rawDesc = nil + file_ocis_services_accounts_v0_accounts_proto_goTypes = nil + file_ocis_services_accounts_v0_accounts_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go b/protogen/gen/ocis/services/accounts/v0/accounts.pb.micro.go similarity index 88% rename from protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go rename to protogen/gen/ocis/services/accounts/v0/accounts.pb.micro.go index b255ba98d6a..583becb1670 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.micro.go +++ b/protogen/gen/ocis/services/accounts/v0/accounts.pb.micro.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/services/accounts/v1/accounts.proto +// source: ocis/services/accounts/v0/accounts.proto -package v1 +package v0 import ( fmt "fmt" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" _ "google.golang.org/genproto/googleapis/api/annotations" proto "google.golang.org/protobuf/proto" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -80,11 +80,11 @@ type AccountsService interface { // Lists accounts ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) // Gets an account - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v1.Account, error) + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v0.Account, error) // Creates an account - CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v1.Account, error) + CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v0.Account, error) // Updates an account - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v1.Account, error) + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v0.Account, error) // Deletes an account DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) } @@ -111,9 +111,9 @@ func (c *accountsService) ListAccounts(ctx context.Context, in *ListAccountsRequ return out, nil } -func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v1.Account, error) { +func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*v0.Account, error) { req := c.c.NewRequest(c.name, "AccountsService.GetAccount", in) - out := new(v1.Account) + out := new(v0.Account) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -121,9 +121,9 @@ func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, return out, nil } -func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v1.Account, error) { +func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*v0.Account, error) { req := c.c.NewRequest(c.name, "AccountsService.CreateAccount", in) - out := new(v1.Account) + out := new(v0.Account) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -131,9 +131,9 @@ func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRe return out, nil } -func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v1.Account, error) { +func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*v0.Account, error) { req := c.c.NewRequest(c.name, "AccountsService.UpdateAccount", in) - out := new(v1.Account) + out := new(v0.Account) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -157,11 +157,11 @@ type AccountsServiceHandler interface { // Lists accounts ListAccounts(context.Context, *ListAccountsRequest, *ListAccountsResponse) error // Gets an account - GetAccount(context.Context, *GetAccountRequest, *v1.Account) error + GetAccount(context.Context, *GetAccountRequest, *v0.Account) error // Creates an account - CreateAccount(context.Context, *CreateAccountRequest, *v1.Account) error + CreateAccount(context.Context, *CreateAccountRequest, *v0.Account) error // Updates an account - UpdateAccount(context.Context, *UpdateAccountRequest, *v1.Account) error + UpdateAccount(context.Context, *UpdateAccountRequest, *v0.Account) error // Deletes an account DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error } @@ -169,9 +169,9 @@ type AccountsServiceHandler interface { func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler, opts ...server.HandlerOption) error { type accountsService interface { ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error - GetAccount(ctx context.Context, in *GetAccountRequest, out *v1.Account) error - CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v1.Account) error - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v1.Account) error + GetAccount(ctx context.Context, in *GetAccountRequest, out *v0.Account) error + CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v0.Account) error + UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v0.Account) error DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error } type AccountsService struct { @@ -224,15 +224,15 @@ func (h *accountsServiceHandler) ListAccounts(ctx context.Context, in *ListAccou return h.AccountsServiceHandler.ListAccounts(ctx, in, out) } -func (h *accountsServiceHandler) GetAccount(ctx context.Context, in *GetAccountRequest, out *v1.Account) error { +func (h *accountsServiceHandler) GetAccount(ctx context.Context, in *GetAccountRequest, out *v0.Account) error { return h.AccountsServiceHandler.GetAccount(ctx, in, out) } -func (h *accountsServiceHandler) CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v1.Account) error { +func (h *accountsServiceHandler) CreateAccount(ctx context.Context, in *CreateAccountRequest, out *v0.Account) error { return h.AccountsServiceHandler.CreateAccount(ctx, in, out) } -func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v1.Account) error { +func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *v0.Account) error { return h.AccountsServiceHandler.UpdateAccount(ctx, in, out) } @@ -309,17 +309,17 @@ type GroupsService interface { // Lists groups ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) // Gets an groups - GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v1.Group, error) + GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v0.Group, error) // Creates a group - CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v1.Group, error) + CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v0.Group, error) // Updates a group - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v1.Group, error) + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v0.Group, error) // Deletes a group DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v1.Group, error) + AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v0.Group, error) // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v1.Group, error) + RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v0.Group, error) // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) } @@ -346,9 +346,9 @@ func (c *groupsService) ListGroups(ctx context.Context, in *ListGroupsRequest, o return out, nil } -func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v1.Group, error) { +func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*v0.Group, error) { req := c.c.NewRequest(c.name, "GroupsService.GetGroup", in) - out := new(v1.Group) + out := new(v0.Group) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -356,9 +356,9 @@ func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts return out, nil } -func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v1.Group, error) { +func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*v0.Group, error) { req := c.c.NewRequest(c.name, "GroupsService.CreateGroup", in) - out := new(v1.Group) + out := new(v0.Group) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -366,9 +366,9 @@ func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, return out, nil } -func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v1.Group, error) { +func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*v0.Group, error) { req := c.c.NewRequest(c.name, "GroupsService.UpdateGroup", in) - out := new(v1.Group) + out := new(v0.Group) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -386,9 +386,9 @@ func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, return out, nil } -func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v1.Group, error) { +func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*v0.Group, error) { req := c.c.NewRequest(c.name, "GroupsService.AddMember", in) - out := new(v1.Group) + out := new(v0.Group) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -396,9 +396,9 @@ func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opt return out, nil } -func (c *groupsService) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v1.Group, error) { +func (c *groupsService) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*v0.Group, error) { req := c.c.NewRequest(c.name, "GroupsService.RemoveMember", in) - out := new(v1.Group) + out := new(v0.Group) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err @@ -422,17 +422,17 @@ type GroupsServiceHandler interface { // Lists groups ListGroups(context.Context, *ListGroupsRequest, *ListGroupsResponse) error // Gets an groups - GetGroup(context.Context, *GetGroupRequest, *v1.Group) error + GetGroup(context.Context, *GetGroupRequest, *v0.Group) error // Creates a group - CreateGroup(context.Context, *CreateGroupRequest, *v1.Group) error + CreateGroup(context.Context, *CreateGroupRequest, *v0.Group) error // Updates a group - UpdateGroup(context.Context, *UpdateGroupRequest, *v1.Group) error + UpdateGroup(context.Context, *UpdateGroupRequest, *v0.Group) error // Deletes a group DeleteGroup(context.Context, *DeleteGroupRequest, *emptypb.Empty) error // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(context.Context, *AddMemberRequest, *v1.Group) error + AddMember(context.Context, *AddMemberRequest, *v0.Group) error // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(context.Context, *RemoveMemberRequest, *v1.Group) error + RemoveMember(context.Context, *RemoveMemberRequest, *v0.Group) error // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 ListMembers(context.Context, *ListMembersRequest, *ListMembersResponse) error } @@ -440,12 +440,12 @@ type GroupsServiceHandler interface { func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, opts ...server.HandlerOption) error { type groupsService interface { ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error - GetGroup(ctx context.Context, in *GetGroupRequest, out *v1.Group) error - CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v1.Group) error - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v1.Group) error + GetGroup(ctx context.Context, in *GetGroupRequest, out *v0.Group) error + CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v0.Group) error + UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v0.Group) error DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error - AddMember(ctx context.Context, in *AddMemberRequest, out *v1.Group) error - RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v1.Group) error + AddMember(ctx context.Context, in *AddMemberRequest, out *v0.Group) error + RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v0.Group) error ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error } type GroupsService struct { @@ -519,15 +519,15 @@ func (h *groupsServiceHandler) ListGroups(ctx context.Context, in *ListGroupsReq return h.GroupsServiceHandler.ListGroups(ctx, in, out) } -func (h *groupsServiceHandler) GetGroup(ctx context.Context, in *GetGroupRequest, out *v1.Group) error { +func (h *groupsServiceHandler) GetGroup(ctx context.Context, in *GetGroupRequest, out *v0.Group) error { return h.GroupsServiceHandler.GetGroup(ctx, in, out) } -func (h *groupsServiceHandler) CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v1.Group) error { +func (h *groupsServiceHandler) CreateGroup(ctx context.Context, in *CreateGroupRequest, out *v0.Group) error { return h.GroupsServiceHandler.CreateGroup(ctx, in, out) } -func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v1.Group) error { +func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *v0.Group) error { return h.GroupsServiceHandler.UpdateGroup(ctx, in, out) } @@ -535,11 +535,11 @@ func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupR return h.GroupsServiceHandler.DeleteGroup(ctx, in, out) } -func (h *groupsServiceHandler) AddMember(ctx context.Context, in *AddMemberRequest, out *v1.Group) error { +func (h *groupsServiceHandler) AddMember(ctx context.Context, in *AddMemberRequest, out *v0.Group) error { return h.GroupsServiceHandler.AddMember(ctx, in, out) } -func (h *groupsServiceHandler) RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v1.Group) error { +func (h *groupsServiceHandler) RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *v0.Group) error { return h.GroupsServiceHandler.RemoveMember(ctx, in, out) } diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go b/protogen/gen/ocis/services/accounts/v0/accounts.pb.web.go similarity index 98% rename from protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go rename to protogen/gen/ocis/services/accounts/v0/accounts.pb.web.go index 446d149930d..1d18174a331 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.pb.web.go +++ b/protogen/gen/ocis/services/accounts/v0/accounts.pb.web.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: v1.proto +// source: v0.proto -package v1 +package v0 import ( "bytes" @@ -13,7 +13,7 @@ import ( "github.com/golang/protobuf/jsonpb" ptypesempty "github.com/golang/protobuf/ptypes/empty" - accountsv1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" + accountsv0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" ) type webAccountsServiceHandler struct { @@ -49,7 +49,7 @@ func (h *webAccountsServiceHandler) ListAccounts(w http.ResponseWriter, r *http. func (h *webAccountsServiceHandler) GetAccount(w http.ResponseWriter, r *http.Request) { req := &GetAccountRequest{} - resp := &accountsv1.Account{} + resp := &accountsv0.Account{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -71,7 +71,7 @@ func (h *webAccountsServiceHandler) GetAccount(w http.ResponseWriter, r *http.Re func (h *webAccountsServiceHandler) CreateAccount(w http.ResponseWriter, r *http.Request) { req := &CreateAccountRequest{} - resp := &accountsv1.Account{} + resp := &accountsv0.Account{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -93,7 +93,7 @@ func (h *webAccountsServiceHandler) CreateAccount(w http.ResponseWriter, r *http func (h *webAccountsServiceHandler) UpdateAccount(w http.ResponseWriter, r *http.Request) { req := &UpdateAccountRequest{} - resp := &accountsv1.Account{} + resp := &accountsv0.Account{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -181,7 +181,7 @@ func (h *webGroupsServiceHandler) ListGroups(w http.ResponseWriter, r *http.Requ func (h *webGroupsServiceHandler) GetGroup(w http.ResponseWriter, r *http.Request) { req := &GetGroupRequest{} - resp := &accountsv1.Group{} + resp := &accountsv0.Group{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -203,7 +203,7 @@ func (h *webGroupsServiceHandler) GetGroup(w http.ResponseWriter, r *http.Reques func (h *webGroupsServiceHandler) CreateGroup(w http.ResponseWriter, r *http.Request) { req := &CreateGroupRequest{} - resp := &accountsv1.Group{} + resp := &accountsv0.Group{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -225,7 +225,7 @@ func (h *webGroupsServiceHandler) CreateGroup(w http.ResponseWriter, r *http.Req func (h *webGroupsServiceHandler) UpdateGroup(w http.ResponseWriter, r *http.Request) { req := &UpdateGroupRequest{} - resp := &accountsv1.Group{} + resp := &accountsv0.Group{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -269,7 +269,7 @@ func (h *webGroupsServiceHandler) DeleteGroup(w http.ResponseWriter, r *http.Req func (h *webGroupsServiceHandler) AddMember(w http.ResponseWriter, r *http.Request) { req := &AddMemberRequest{} - resp := &accountsv1.Group{} + resp := &accountsv0.Group{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) @@ -291,7 +291,7 @@ func (h *webGroupsServiceHandler) AddMember(w http.ResponseWriter, r *http.Reque func (h *webGroupsServiceHandler) RemoveMember(w http.ResponseWriter, r *http.Request) { req := &RemoveMemberRequest{} - resp := &accountsv1.Group{} + resp := &accountsv0.Group{} if err := json.NewDecoder(r.Body).Decode(&req); err != nil { http.Error(w, err.Error(), http.StatusPreconditionFailed) diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v0/accounts.swagger.json similarity index 94% rename from protogen/gen/ocis/services/accounts/v1/accounts.swagger.json rename to protogen/gen/ocis/services/accounts/v0/accounts.swagger.json index 67365de3ffc..13b50de4c11 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v0/accounts.swagger.json @@ -43,7 +43,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" } }, "default": { @@ -59,7 +59,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateAccountRequest" + "$ref": "#/definitions/v0CreateAccountRequest" } } ], @@ -92,7 +92,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1DeleteAccountRequest" + "$ref": "#/definitions/v0DeleteAccountRequest" } } ], @@ -109,7 +109,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" } }, "default": { @@ -125,7 +125,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetAccountRequest" + "$ref": "#/definitions/v0GetAccountRequest" } } ], @@ -142,7 +142,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListAccountsResponse" + "$ref": "#/definitions/v0ListAccountsResponse" } }, "default": { @@ -158,7 +158,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListAccountsRequest" + "$ref": "#/definitions/v0ListAccountsRequest" } } ], @@ -175,7 +175,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" } }, "default": { @@ -191,7 +191,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1UpdateAccountRequest" + "$ref": "#/definitions/v0UpdateAccountRequest" } } ], @@ -208,7 +208,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" } }, "default": { @@ -224,7 +224,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreateGroupRequest" + "$ref": "#/definitions/v0CreateGroupRequest" } } ], @@ -257,7 +257,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1DeleteGroupRequest" + "$ref": "#/definitions/v0DeleteGroupRequest" } } ], @@ -274,7 +274,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" } }, "default": { @@ -290,7 +290,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetGroupRequest" + "$ref": "#/definitions/v0GetGroupRequest" } } ], @@ -307,7 +307,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListGroupsResponse" + "$ref": "#/definitions/v0ListGroupsResponse" } }, "default": { @@ -323,7 +323,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListGroupsRequest" + "$ref": "#/definitions/v0ListGroupsRequest" } } ], @@ -340,7 +340,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" } }, "default": { @@ -356,7 +356,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1UpdateGroupRequest" + "$ref": "#/definitions/v0UpdateGroupRequest" } } ], @@ -373,7 +373,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" } }, "default": { @@ -420,7 +420,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" } }, "default": { @@ -468,7 +468,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListMembersResponse" + "$ref": "#/definitions/v0ListMembersResponse" } }, "default": { @@ -527,7 +527,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RebuildIndexResponse" + "$ref": "#/definitions/v0RebuildIndexResponse" } }, "default": { @@ -543,7 +543,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1RebuildIndexRequest" + "$ref": "#/definitions/v0RebuildIndexRequest" } } ], @@ -581,7 +581,7 @@ } } }, - "v1Account": { + "v0Account": { "type": "object", "properties": { "id": { @@ -603,7 +603,7 @@ "identities": { "type": "array", "items": { - "$ref": "#/definitions/v1Identities" + "$ref": "#/definitions/v0Identities" }, "description": "Represents the identities that can be used to sign in to this account.\nAn identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account.\nMay contain multiple items with the same signInType value. Supports $filter." }, @@ -634,13 +634,13 @@ "title": "A description, useful for resource accounts\nposixaccount MAY description" }, "passwordProfile": { - "$ref": "#/definitions/v1PasswordProfile", + "$ref": "#/definitions/v0PasswordProfile", "title": "Specifies the password profile for the user.\nThe profile contains the user’s password. This property is required when a user is created.\nThe password in the profile must satisfy minimum requirements as specified by the passwordPolicies property.\nBy default, a strong password is required.\nposixaccount MAY authPassword" }, "memberOf": { "type": "array", "items": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" }, "title": "The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable.\nshould we only respond with repeated strings of ids? no clients should a proper filter mask!" }, @@ -690,7 +690,7 @@ "onPremisesProvisioningErrors": { "type": "array", "items": { - "$ref": "#/definitions/v1OnPremisesProvisioningError" + "$ref": "#/definitions/v0OnPremisesProvisioningError" }, "description": "Errors when using synchronization during provisioning." }, @@ -716,25 +716,25 @@ }, "title": "Account follows the properties of the ms graph api user resource.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties" }, - "v1CreateAccountRequest": { + "v0CreateAccountRequest": { "type": "object", "properties": { "account": { - "$ref": "#/definitions/v1Account", + "$ref": "#/definitions/v0Account", "title": "The account resource to create" } } }, - "v1CreateGroupRequest": { + "v0CreateGroupRequest": { "type": "object", "properties": { "group": { - "$ref": "#/definitions/v1Group", + "$ref": "#/definitions/v0Group", "title": "The account resource to create" } } }, - "v1DeleteAccountRequest": { + "v0DeleteAccountRequest": { "type": "object", "properties": { "id": { @@ -742,7 +742,7 @@ } } }, - "v1DeleteGroupRequest": { + "v0DeleteGroupRequest": { "type": "object", "properties": { "id": { @@ -750,7 +750,7 @@ } } }, - "v1GetAccountRequest": { + "v0GetAccountRequest": { "type": "object", "properties": { "id": { @@ -758,7 +758,7 @@ } } }, - "v1GetGroupRequest": { + "v0GetGroupRequest": { "type": "object", "properties": { "id": { @@ -766,7 +766,7 @@ } } }, - "v1Group": { + "v0Group": { "type": "object", "properties": { "id": { @@ -780,14 +780,14 @@ "members": { "type": "array", "items": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" }, "description": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable." }, "owners": { "type": "array", "items": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" }, "title": "groupofnames MAY businessCategory\ngroupofnames MAY o\ngroupofnames MAY ou\ngroupofnames MAY owner, SINGLE-VALUE but there might be multiple owners" }, @@ -858,13 +858,13 @@ "onPremisesProvisioningErrors": { "type": "array", "items": { - "$ref": "#/definitions/v1OnPremisesProvisioningError" + "$ref": "#/definitions/v0OnPremisesProvisioningError" }, "description": "Errors when using synchronization during provisioning." } } }, - "v1Identities": { + "v0Identities": { "type": "object", "properties": { "signInType": { @@ -882,7 +882,7 @@ }, "description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames." }, - "v1ListAccountsRequest": { + "v0ListAccountsRequest": { "type": "object", "properties": { "pageSize": { @@ -905,13 +905,13 @@ } } }, - "v1ListAccountsResponse": { + "v0ListAccountsResponse": { "type": "object", "properties": { "accounts": { "type": "array", "items": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" }, "title": "The field name should match the noun \"accounts\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" }, @@ -921,7 +921,7 @@ } } }, - "v1ListGroupsRequest": { + "v0ListGroupsRequest": { "type": "object", "properties": { "pageSize": { @@ -944,13 +944,13 @@ } } }, - "v1ListGroupsResponse": { + "v0ListGroupsResponse": { "type": "object", "properties": { "groups": { "type": "array", "items": { - "$ref": "#/definitions/v1Group" + "$ref": "#/definitions/v0Group" }, "title": "The field name should match the noun \"group\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" }, @@ -960,13 +960,13 @@ } } }, - "v1ListMembersResponse": { + "v0ListMembersResponse": { "type": "object", "properties": { "members": { "type": "array", "items": { - "$ref": "#/definitions/v1Account" + "$ref": "#/definitions/v0Account" }, "title": "The field name should match the noun \"members\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" }, @@ -976,7 +976,7 @@ } } }, - "v1OnPremisesProvisioningError": { + "v0OnPremisesProvisioningError": { "type": "object", "properties": { "category": { @@ -998,7 +998,7 @@ } } }, - "v1PasswordProfile": { + "v0PasswordProfile": { "type": "object", "properties": { "password": { @@ -1027,17 +1027,17 @@ } } }, - "v1RebuildIndexRequest": { + "v0RebuildIndexRequest": { "type": "object" }, - "v1RebuildIndexResponse": { + "v0RebuildIndexResponse": { "type": "object" }, - "v1UpdateAccountRequest": { + "v0UpdateAccountRequest": { "type": "object", "properties": { "account": { - "$ref": "#/definitions/v1Account", + "$ref": "#/definitions/v0Account", "title": "The account resource which replaces the resource on the server" }, "updateMask": { @@ -1046,11 +1046,11 @@ } } }, - "v1UpdateGroupRequest": { + "v0UpdateGroupRequest": { "type": "object", "properties": { "group": { - "$ref": "#/definitions/v1Group", + "$ref": "#/definitions/v0Group", "title": "The group resource which replaces the resource on the server" }, "updateMask": { diff --git a/protogen/gen/ocis/services/settings/v1/settings.mock.go b/protogen/gen/ocis/services/settings/v0/settings.mock.go similarity index 99% rename from protogen/gen/ocis/services/settings/v1/settings.mock.go rename to protogen/gen/ocis/services/settings/v0/settings.mock.go index fe509d9dcbb..d04a55e4f9a 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.mock.go +++ b/protogen/gen/ocis/services/settings/v0/settings.mock.go @@ -1,4 +1,4 @@ -package v1 +package v0 import ( "context" diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.go b/protogen/gen/ocis/services/settings/v0/settings.pb.go similarity index 77% rename from protogen/gen/ocis/services/settings/v1/settings.pb.go rename to protogen/gen/ocis/services/settings/v0/settings.pb.go index 926182a3683..5eeeb956652 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.go @@ -2,13 +2,13 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/services/settings/v1/settings.proto +// source: ocis/services/settings/v0/settings.proto -package v1 +package v0 import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -32,13 +32,13 @@ type SaveBundleRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` + Bundle *v0.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *SaveBundleRequest) Reset() { *x = SaveBundleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[0] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -51,7 +51,7 @@ func (x *SaveBundleRequest) String() string { func (*SaveBundleRequest) ProtoMessage() {} func (x *SaveBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[0] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -64,10 +64,10 @@ func (x *SaveBundleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveBundleRequest.ProtoReflect.Descriptor instead. func (*SaveBundleRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{0} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{0} } -func (x *SaveBundleRequest) GetBundle() *v1.Bundle { +func (x *SaveBundleRequest) GetBundle() *v0.Bundle { if x != nil { return x.Bundle } @@ -79,13 +79,13 @@ type SaveBundleResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` + Bundle *v0.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *SaveBundleResponse) Reset() { *x = SaveBundleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[1] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -98,7 +98,7 @@ func (x *SaveBundleResponse) String() string { func (*SaveBundleResponse) ProtoMessage() {} func (x *SaveBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[1] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111,10 +111,10 @@ func (x *SaveBundleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveBundleResponse.ProtoReflect.Descriptor instead. func (*SaveBundleResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{1} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{1} } -func (x *SaveBundleResponse) GetBundle() *v1.Bundle { +func (x *SaveBundleResponse) GetBundle() *v0.Bundle { if x != nil { return x.Bundle } @@ -132,7 +132,7 @@ type GetBundleRequest struct { func (x *GetBundleRequest) Reset() { *x = GetBundleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[2] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -145,7 +145,7 @@ func (x *GetBundleRequest) String() string { func (*GetBundleRequest) ProtoMessage() {} func (x *GetBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[2] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -158,7 +158,7 @@ func (x *GetBundleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBundleRequest.ProtoReflect.Descriptor instead. func (*GetBundleRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{2} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{2} } func (x *GetBundleRequest) GetBundleId() string { @@ -173,13 +173,13 @@ type GetBundleResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bundle *v1.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` + Bundle *v0.Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"` } func (x *GetBundleResponse) Reset() { *x = GetBundleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[3] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -192,7 +192,7 @@ func (x *GetBundleResponse) String() string { func (*GetBundleResponse) ProtoMessage() {} func (x *GetBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[3] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -205,10 +205,10 @@ func (x *GetBundleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBundleResponse.ProtoReflect.Descriptor instead. func (*GetBundleResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{3} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{3} } -func (x *GetBundleResponse) GetBundle() *v1.Bundle { +func (x *GetBundleResponse) GetBundle() *v0.Bundle { if x != nil { return x.Bundle } @@ -226,7 +226,7 @@ type ListBundlesRequest struct { func (x *ListBundlesRequest) Reset() { *x = ListBundlesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[4] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -239,7 +239,7 @@ func (x *ListBundlesRequest) String() string { func (*ListBundlesRequest) ProtoMessage() {} func (x *ListBundlesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[4] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -252,7 +252,7 @@ func (x *ListBundlesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBundlesRequest.ProtoReflect.Descriptor instead. func (*ListBundlesRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{4} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{4} } func (x *ListBundlesRequest) GetBundleIds() []string { @@ -267,13 +267,13 @@ type ListBundlesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bundles []*v1.Bundle `protobuf:"bytes,1,rep,name=bundles,proto3" json:"bundles,omitempty"` + Bundles []*v0.Bundle `protobuf:"bytes,1,rep,name=bundles,proto3" json:"bundles,omitempty"` } func (x *ListBundlesResponse) Reset() { *x = ListBundlesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[5] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +286,7 @@ func (x *ListBundlesResponse) String() string { func (*ListBundlesResponse) ProtoMessage() {} func (x *ListBundlesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[5] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,10 +299,10 @@ func (x *ListBundlesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBundlesResponse.ProtoReflect.Descriptor instead. func (*ListBundlesResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{5} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{5} } -func (x *ListBundlesResponse) GetBundles() []*v1.Bundle { +func (x *ListBundlesResponse) GetBundles() []*v0.Bundle { if x != nil { return x.Bundles } @@ -315,13 +315,13 @@ type AddSettingToBundleRequest struct { unknownFields protoimpl.UnknownFields BundleId string `protobuf:"bytes,1,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` - Setting *v1.Setting `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"` + Setting *v0.Setting `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"` } func (x *AddSettingToBundleRequest) Reset() { *x = AddSettingToBundleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[6] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -334,7 +334,7 @@ func (x *AddSettingToBundleRequest) String() string { func (*AddSettingToBundleRequest) ProtoMessage() {} func (x *AddSettingToBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[6] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -347,7 +347,7 @@ func (x *AddSettingToBundleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddSettingToBundleRequest.ProtoReflect.Descriptor instead. func (*AddSettingToBundleRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{6} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{6} } func (x *AddSettingToBundleRequest) GetBundleId() string { @@ -357,7 +357,7 @@ func (x *AddSettingToBundleRequest) GetBundleId() string { return "" } -func (x *AddSettingToBundleRequest) GetSetting() *v1.Setting { +func (x *AddSettingToBundleRequest) GetSetting() *v0.Setting { if x != nil { return x.Setting } @@ -369,13 +369,13 @@ type AddSettingToBundleResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Setting *v1.Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"` + Setting *v0.Setting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"` } func (x *AddSettingToBundleResponse) Reset() { *x = AddSettingToBundleResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[7] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -388,7 +388,7 @@ func (x *AddSettingToBundleResponse) String() string { func (*AddSettingToBundleResponse) ProtoMessage() {} func (x *AddSettingToBundleResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[7] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -401,10 +401,10 @@ func (x *AddSettingToBundleResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddSettingToBundleResponse.ProtoReflect.Descriptor instead. func (*AddSettingToBundleResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{7} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{7} } -func (x *AddSettingToBundleResponse) GetSetting() *v1.Setting { +func (x *AddSettingToBundleResponse) GetSetting() *v0.Setting { if x != nil { return x.Setting } @@ -423,7 +423,7 @@ type RemoveSettingFromBundleRequest struct { func (x *RemoveSettingFromBundleRequest) Reset() { *x = RemoveSettingFromBundleRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[8] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -436,7 +436,7 @@ func (x *RemoveSettingFromBundleRequest) String() string { func (*RemoveSettingFromBundleRequest) ProtoMessage() {} func (x *RemoveSettingFromBundleRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[8] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -449,7 +449,7 @@ func (x *RemoveSettingFromBundleRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveSettingFromBundleRequest.ProtoReflect.Descriptor instead. func (*RemoveSettingFromBundleRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{8} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{8} } func (x *RemoveSettingFromBundleRequest) GetBundleId() string { @@ -471,13 +471,13 @@ type SaveValueRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Value *v1.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Value *v0.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } func (x *SaveValueRequest) Reset() { *x = SaveValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[9] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -490,7 +490,7 @@ func (x *SaveValueRequest) String() string { func (*SaveValueRequest) ProtoMessage() {} func (x *SaveValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[9] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -503,10 +503,10 @@ func (x *SaveValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveValueRequest.ProtoReflect.Descriptor instead. func (*SaveValueRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{9} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{9} } -func (x *SaveValueRequest) GetValue() *v1.Value { +func (x *SaveValueRequest) GetValue() *v0.Value { if x != nil { return x.Value } @@ -518,13 +518,13 @@ type SaveValueResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Value *v1.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Value *v0.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } func (x *SaveValueResponse) Reset() { *x = SaveValueResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[10] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -537,7 +537,7 @@ func (x *SaveValueResponse) String() string { func (*SaveValueResponse) ProtoMessage() {} func (x *SaveValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[10] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -550,10 +550,10 @@ func (x *SaveValueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SaveValueResponse.ProtoReflect.Descriptor instead. func (*SaveValueResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{10} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{10} } -func (x *SaveValueResponse) GetValue() *v1.ValueWithIdentifier { +func (x *SaveValueResponse) GetValue() *v0.ValueWithIdentifier { if x != nil { return x.Value } @@ -571,7 +571,7 @@ type GetValueRequest struct { func (x *GetValueRequest) Reset() { *x = GetValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[11] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -584,7 +584,7 @@ func (x *GetValueRequest) String() string { func (*GetValueRequest) ProtoMessage() {} func (x *GetValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[11] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -597,7 +597,7 @@ func (x *GetValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetValueRequest.ProtoReflect.Descriptor instead. func (*GetValueRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{11} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{11} } func (x *GetValueRequest) GetId() string { @@ -612,13 +612,13 @@ type GetValueResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Value *v1.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + Value *v0.ValueWithIdentifier `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } func (x *GetValueResponse) Reset() { *x = GetValueResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[12] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -631,7 +631,7 @@ func (x *GetValueResponse) String() string { func (*GetValueResponse) ProtoMessage() {} func (x *GetValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[12] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -644,10 +644,10 @@ func (x *GetValueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetValueResponse.ProtoReflect.Descriptor instead. func (*GetValueResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{12} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{12} } -func (x *GetValueResponse) GetValue() *v1.ValueWithIdentifier { +func (x *GetValueResponse) GetValue() *v0.ValueWithIdentifier { if x != nil { return x.Value } @@ -666,7 +666,7 @@ type ListValuesRequest struct { func (x *ListValuesRequest) Reset() { *x = ListValuesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[13] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -679,7 +679,7 @@ func (x *ListValuesRequest) String() string { func (*ListValuesRequest) ProtoMessage() {} func (x *ListValuesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[13] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -692,7 +692,7 @@ func (x *ListValuesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListValuesRequest.ProtoReflect.Descriptor instead. func (*ListValuesRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{13} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{13} } func (x *ListValuesRequest) GetBundleId() string { @@ -714,13 +714,13 @@ type ListValuesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Values []*v1.ValueWithIdentifier `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + Values []*v0.ValueWithIdentifier `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } func (x *ListValuesResponse) Reset() { *x = ListValuesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[14] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -733,7 +733,7 @@ func (x *ListValuesResponse) String() string { func (*ListValuesResponse) ProtoMessage() {} func (x *ListValuesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[14] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -746,10 +746,10 @@ func (x *ListValuesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListValuesResponse.ProtoReflect.Descriptor instead. func (*ListValuesResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{14} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{14} } -func (x *ListValuesResponse) GetValues() []*v1.ValueWithIdentifier { +func (x *ListValuesResponse) GetValues() []*v0.ValueWithIdentifier { if x != nil { return x.Values } @@ -768,7 +768,7 @@ type GetValueByUniqueIdentifiersRequest struct { func (x *GetValueByUniqueIdentifiersRequest) Reset() { *x = GetValueByUniqueIdentifiersRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[15] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -781,7 +781,7 @@ func (x *GetValueByUniqueIdentifiersRequest) String() string { func (*GetValueByUniqueIdentifiersRequest) ProtoMessage() {} func (x *GetValueByUniqueIdentifiersRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[15] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -794,7 +794,7 @@ func (x *GetValueByUniqueIdentifiersRequest) ProtoReflect() protoreflect.Message // Deprecated: Use GetValueByUniqueIdentifiersRequest.ProtoReflect.Descriptor instead. func (*GetValueByUniqueIdentifiersRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{15} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{15} } func (x *GetValueByUniqueIdentifiersRequest) GetAccountUuid() string { @@ -822,7 +822,7 @@ type ListRoleAssignmentsRequest struct { func (x *ListRoleAssignmentsRequest) Reset() { *x = ListRoleAssignmentsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[16] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -835,7 +835,7 @@ func (x *ListRoleAssignmentsRequest) String() string { func (*ListRoleAssignmentsRequest) ProtoMessage() {} func (x *ListRoleAssignmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[16] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -848,7 +848,7 @@ func (x *ListRoleAssignmentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoleAssignmentsRequest.ProtoReflect.Descriptor instead. func (*ListRoleAssignmentsRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{16} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{16} } func (x *ListRoleAssignmentsRequest) GetAccountUuid() string { @@ -863,13 +863,13 @@ type ListRoleAssignmentsResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Assignments []*v1.UserRoleAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` + Assignments []*v0.UserRoleAssignment `protobuf:"bytes,1,rep,name=assignments,proto3" json:"assignments,omitempty"` } func (x *ListRoleAssignmentsResponse) Reset() { *x = ListRoleAssignmentsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[17] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -882,7 +882,7 @@ func (x *ListRoleAssignmentsResponse) String() string { func (*ListRoleAssignmentsResponse) ProtoMessage() {} func (x *ListRoleAssignmentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[17] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -895,10 +895,10 @@ func (x *ListRoleAssignmentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoleAssignmentsResponse.ProtoReflect.Descriptor instead. func (*ListRoleAssignmentsResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{17} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{17} } -func (x *ListRoleAssignmentsResponse) GetAssignments() []*v1.UserRoleAssignment { +func (x *ListRoleAssignmentsResponse) GetAssignments() []*v0.UserRoleAssignment { if x != nil { return x.Assignments } @@ -918,7 +918,7 @@ type AssignRoleToUserRequest struct { func (x *AssignRoleToUserRequest) Reset() { *x = AssignRoleToUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[18] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -931,7 +931,7 @@ func (x *AssignRoleToUserRequest) String() string { func (*AssignRoleToUserRequest) ProtoMessage() {} func (x *AssignRoleToUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[18] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -944,7 +944,7 @@ func (x *AssignRoleToUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AssignRoleToUserRequest.ProtoReflect.Descriptor instead. func (*AssignRoleToUserRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{18} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{18} } func (x *AssignRoleToUserRequest) GetAccountUuid() string { @@ -966,13 +966,13 @@ type AssignRoleToUserResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Assignment *v1.UserRoleAssignment `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"` + Assignment *v0.UserRoleAssignment `protobuf:"bytes,1,opt,name=assignment,proto3" json:"assignment,omitempty"` } func (x *AssignRoleToUserResponse) Reset() { *x = AssignRoleToUserResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[19] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -985,7 +985,7 @@ func (x *AssignRoleToUserResponse) String() string { func (*AssignRoleToUserResponse) ProtoMessage() {} func (x *AssignRoleToUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[19] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -998,10 +998,10 @@ func (x *AssignRoleToUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AssignRoleToUserResponse.ProtoReflect.Descriptor instead. func (*AssignRoleToUserResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{19} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{19} } -func (x *AssignRoleToUserResponse) GetAssignment() *v1.UserRoleAssignment { +func (x *AssignRoleToUserResponse) GetAssignment() *v0.UserRoleAssignment { if x != nil { return x.Assignment } @@ -1019,7 +1019,7 @@ type RemoveRoleFromUserRequest struct { func (x *RemoveRoleFromUserRequest) Reset() { *x = RemoveRoleFromUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[20] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1032,7 +1032,7 @@ func (x *RemoveRoleFromUserRequest) String() string { func (*RemoveRoleFromUserRequest) ProtoMessage() {} func (x *RemoveRoleFromUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[20] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1045,7 +1045,7 @@ func (x *RemoveRoleFromUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveRoleFromUserRequest.ProtoReflect.Descriptor instead. func (*RemoveRoleFromUserRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{20} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{20} } func (x *RemoveRoleFromUserRequest) GetId() string { @@ -1060,13 +1060,13 @@ type ListPermissionsByResourceRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Resource *v0.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` } func (x *ListPermissionsByResourceRequest) Reset() { *x = ListPermissionsByResourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[21] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1079,7 +1079,7 @@ func (x *ListPermissionsByResourceRequest) String() string { func (*ListPermissionsByResourceRequest) ProtoMessage() {} func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[21] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1092,10 +1092,10 @@ func (x *ListPermissionsByResourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPermissionsByResourceRequest.ProtoReflect.Descriptor instead. func (*ListPermissionsByResourceRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{21} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{21} } -func (x *ListPermissionsByResourceRequest) GetResource() *v1.Resource { +func (x *ListPermissionsByResourceRequest) GetResource() *v0.Resource { if x != nil { return x.Resource } @@ -1107,13 +1107,13 @@ type ListPermissionsByResourceResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Permissions []*v1.Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` + Permissions []*v0.Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"` } func (x *ListPermissionsByResourceResponse) Reset() { *x = ListPermissionsByResourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[22] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1126,7 +1126,7 @@ func (x *ListPermissionsByResourceResponse) String() string { func (*ListPermissionsByResourceResponse) ProtoMessage() {} func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[22] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1139,10 +1139,10 @@ func (x *ListPermissionsByResourceResponse) ProtoReflect() protoreflect.Message // Deprecated: Use ListPermissionsByResourceResponse.ProtoReflect.Descriptor instead. func (*ListPermissionsByResourceResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{22} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{22} } -func (x *ListPermissionsByResourceResponse) GetPermissions() []*v1.Permission { +func (x *ListPermissionsByResourceResponse) GetPermissions() []*v0.Permission { if x != nil { return x.Permissions } @@ -1160,7 +1160,7 @@ type GetPermissionByIDRequest struct { func (x *GetPermissionByIDRequest) Reset() { *x = GetPermissionByIDRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[23] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1173,7 +1173,7 @@ func (x *GetPermissionByIDRequest) String() string { func (*GetPermissionByIDRequest) ProtoMessage() {} func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[23] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1186,7 +1186,7 @@ func (x *GetPermissionByIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPermissionByIDRequest.ProtoReflect.Descriptor instead. func (*GetPermissionByIDRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{23} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{23} } func (x *GetPermissionByIDRequest) GetPermissionId() string { @@ -1201,13 +1201,13 @@ type GetPermissionByIDResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Permission *v1.Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` + Permission *v0.Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"` } func (x *GetPermissionByIDResponse) Reset() { *x = GetPermissionByIDResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[24] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1220,7 +1220,7 @@ func (x *GetPermissionByIDResponse) String() string { func (*GetPermissionByIDResponse) ProtoMessage() {} func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_settings_v1_settings_proto_msgTypes[24] + mi := &file_ocis_services_settings_v0_settings_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1233,25 +1233,25 @@ func (x *GetPermissionByIDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPermissionByIDResponse.ProtoReflect.Descriptor instead. func (*GetPermissionByIDResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_settings_v1_settings_proto_rawDescGZIP(), []int{24} + return file_ocis_services_settings_v0_settings_proto_rawDescGZIP(), []int{24} } -func (x *GetPermissionByIDResponse) GetPermission() *v1.Permission { +func (x *GetPermissionByIDResponse) GetPermission() *v0.Permission { if x != nil { return x.Permission } return nil } -var File_ocis_services_settings_v1_settings_proto protoreflect.FileDescriptor +var File_ocis_services_settings_v0_settings_proto protoreflect.FileDescriptor -var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ +var file_ocis_services_settings_v0_settings_proto_rawDesc = []byte{ 0x0a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x31, + 0x67, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x28, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 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, 0x1b, 0x67, @@ -1263,12 +1263,12 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x4f, 0x0a, 0x12, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x2f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, @@ -1276,7 +1276,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, + 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x33, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, @@ -1285,20 +1285,20 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x19, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5a, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x5c, 0x0a, 0x1e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, @@ -1309,19 +1309,19 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x59, 0x0a, 0x11, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, + 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x53, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, @@ -1333,7 +1333,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, + 0x76, 0x30, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, @@ -1350,7 +1350,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x55, 0x0a, 0x17, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, @@ -1362,7 +1362,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2b, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, @@ -1372,14 +1372,14 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x6c, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, + 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, @@ -1389,44 +1389,44 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0xa6, 0x06, 0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, + 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x62, 0x75, @@ -1434,7 +1434,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x39, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, @@ -1445,39 +1445,39 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x73, 0x61, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2d, 0x67, 0x65, 0x74, 0x2d, 0x62, @@ -1486,20 +1486,20 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, @@ -1507,17 +1507,17 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x2a, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, + 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, + 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2d, 0x61, 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, @@ -1529,10 +1529,10 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, @@ -1541,11 +1541,11 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xb1, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x12, 0x33, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, + 0x30, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, @@ -1554,7 +1554,7 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x76, 0x31, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, + 0x76, 0x30, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, 0x20, 0x68, 0x74, @@ -1576,99 +1576,99 @@ var file_ocis_services_settings_v1_settings_proto_rawDesc = []byte{ } var ( - file_ocis_services_settings_v1_settings_proto_rawDescOnce sync.Once - file_ocis_services_settings_v1_settings_proto_rawDescData = file_ocis_services_settings_v1_settings_proto_rawDesc + file_ocis_services_settings_v0_settings_proto_rawDescOnce sync.Once + file_ocis_services_settings_v0_settings_proto_rawDescData = file_ocis_services_settings_v0_settings_proto_rawDesc ) -func file_ocis_services_settings_v1_settings_proto_rawDescGZIP() []byte { - file_ocis_services_settings_v1_settings_proto_rawDescOnce.Do(func() { - file_ocis_services_settings_v1_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_settings_v1_settings_proto_rawDescData) +func file_ocis_services_settings_v0_settings_proto_rawDescGZIP() []byte { + file_ocis_services_settings_v0_settings_proto_rawDescOnce.Do(func() { + file_ocis_services_settings_v0_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_settings_v0_settings_proto_rawDescData) }) - return file_ocis_services_settings_v1_settings_proto_rawDescData -} - -var file_ocis_services_settings_v1_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25) -var file_ocis_services_settings_v1_settings_proto_goTypes = []interface{}{ - (*SaveBundleRequest)(nil), // 0: ocis.services.settings.v1.SaveBundleRequest - (*SaveBundleResponse)(nil), // 1: ocis.services.settings.v1.SaveBundleResponse - (*GetBundleRequest)(nil), // 2: ocis.services.settings.v1.GetBundleRequest - (*GetBundleResponse)(nil), // 3: ocis.services.settings.v1.GetBundleResponse - (*ListBundlesRequest)(nil), // 4: ocis.services.settings.v1.ListBundlesRequest - (*ListBundlesResponse)(nil), // 5: ocis.services.settings.v1.ListBundlesResponse - (*AddSettingToBundleRequest)(nil), // 6: ocis.services.settings.v1.AddSettingToBundleRequest - (*AddSettingToBundleResponse)(nil), // 7: ocis.services.settings.v1.AddSettingToBundleResponse - (*RemoveSettingFromBundleRequest)(nil), // 8: ocis.services.settings.v1.RemoveSettingFromBundleRequest - (*SaveValueRequest)(nil), // 9: ocis.services.settings.v1.SaveValueRequest - (*SaveValueResponse)(nil), // 10: ocis.services.settings.v1.SaveValueResponse - (*GetValueRequest)(nil), // 11: ocis.services.settings.v1.GetValueRequest - (*GetValueResponse)(nil), // 12: ocis.services.settings.v1.GetValueResponse - (*ListValuesRequest)(nil), // 13: ocis.services.settings.v1.ListValuesRequest - (*ListValuesResponse)(nil), // 14: ocis.services.settings.v1.ListValuesResponse - (*GetValueByUniqueIdentifiersRequest)(nil), // 15: ocis.services.settings.v1.GetValueByUniqueIdentifiersRequest - (*ListRoleAssignmentsRequest)(nil), // 16: ocis.services.settings.v1.ListRoleAssignmentsRequest - (*ListRoleAssignmentsResponse)(nil), // 17: ocis.services.settings.v1.ListRoleAssignmentsResponse - (*AssignRoleToUserRequest)(nil), // 18: ocis.services.settings.v1.AssignRoleToUserRequest - (*AssignRoleToUserResponse)(nil), // 19: ocis.services.settings.v1.AssignRoleToUserResponse - (*RemoveRoleFromUserRequest)(nil), // 20: ocis.services.settings.v1.RemoveRoleFromUserRequest - (*ListPermissionsByResourceRequest)(nil), // 21: ocis.services.settings.v1.ListPermissionsByResourceRequest - (*ListPermissionsByResourceResponse)(nil), // 22: ocis.services.settings.v1.ListPermissionsByResourceResponse - (*GetPermissionByIDRequest)(nil), // 23: ocis.services.settings.v1.GetPermissionByIDRequest - (*GetPermissionByIDResponse)(nil), // 24: ocis.services.settings.v1.GetPermissionByIDResponse - (*v1.Bundle)(nil), // 25: ocis.messages.settings.v1.Bundle - (*v1.Setting)(nil), // 26: ocis.messages.settings.v1.Setting - (*v1.Value)(nil), // 27: ocis.messages.settings.v1.Value - (*v1.ValueWithIdentifier)(nil), // 28: ocis.messages.settings.v1.ValueWithIdentifier - (*v1.UserRoleAssignment)(nil), // 29: ocis.messages.settings.v1.UserRoleAssignment - (*v1.Resource)(nil), // 30: ocis.messages.settings.v1.Resource - (*v1.Permission)(nil), // 31: ocis.messages.settings.v1.Permission + return file_ocis_services_settings_v0_settings_proto_rawDescData +} + +var file_ocis_services_settings_v0_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_ocis_services_settings_v0_settings_proto_goTypes = []interface{}{ + (*SaveBundleRequest)(nil), // 0: ocis.services.settings.v0.SaveBundleRequest + (*SaveBundleResponse)(nil), // 1: ocis.services.settings.v0.SaveBundleResponse + (*GetBundleRequest)(nil), // 2: ocis.services.settings.v0.GetBundleRequest + (*GetBundleResponse)(nil), // 3: ocis.services.settings.v0.GetBundleResponse + (*ListBundlesRequest)(nil), // 4: ocis.services.settings.v0.ListBundlesRequest + (*ListBundlesResponse)(nil), // 5: ocis.services.settings.v0.ListBundlesResponse + (*AddSettingToBundleRequest)(nil), // 6: ocis.services.settings.v0.AddSettingToBundleRequest + (*AddSettingToBundleResponse)(nil), // 7: ocis.services.settings.v0.AddSettingToBundleResponse + (*RemoveSettingFromBundleRequest)(nil), // 8: ocis.services.settings.v0.RemoveSettingFromBundleRequest + (*SaveValueRequest)(nil), // 9: ocis.services.settings.v0.SaveValueRequest + (*SaveValueResponse)(nil), // 10: ocis.services.settings.v0.SaveValueResponse + (*GetValueRequest)(nil), // 11: ocis.services.settings.v0.GetValueRequest + (*GetValueResponse)(nil), // 12: ocis.services.settings.v0.GetValueResponse + (*ListValuesRequest)(nil), // 13: ocis.services.settings.v0.ListValuesRequest + (*ListValuesResponse)(nil), // 14: ocis.services.settings.v0.ListValuesResponse + (*GetValueByUniqueIdentifiersRequest)(nil), // 15: ocis.services.settings.v0.GetValueByUniqueIdentifiersRequest + (*ListRoleAssignmentsRequest)(nil), // 16: ocis.services.settings.v0.ListRoleAssignmentsRequest + (*ListRoleAssignmentsResponse)(nil), // 17: ocis.services.settings.v0.ListRoleAssignmentsResponse + (*AssignRoleToUserRequest)(nil), // 18: ocis.services.settings.v0.AssignRoleToUserRequest + (*AssignRoleToUserResponse)(nil), // 19: ocis.services.settings.v0.AssignRoleToUserResponse + (*RemoveRoleFromUserRequest)(nil), // 20: ocis.services.settings.v0.RemoveRoleFromUserRequest + (*ListPermissionsByResourceRequest)(nil), // 21: ocis.services.settings.v0.ListPermissionsByResourceRequest + (*ListPermissionsByResourceResponse)(nil), // 22: ocis.services.settings.v0.ListPermissionsByResourceResponse + (*GetPermissionByIDRequest)(nil), // 23: ocis.services.settings.v0.GetPermissionByIDRequest + (*GetPermissionByIDResponse)(nil), // 24: ocis.services.settings.v0.GetPermissionByIDResponse + (*v0.Bundle)(nil), // 25: ocis.messages.settings.v0.Bundle + (*v0.Setting)(nil), // 26: ocis.messages.settings.v0.Setting + (*v0.Value)(nil), // 27: ocis.messages.settings.v0.Value + (*v0.ValueWithIdentifier)(nil), // 28: ocis.messages.settings.v0.ValueWithIdentifier + (*v0.UserRoleAssignment)(nil), // 29: ocis.messages.settings.v0.UserRoleAssignment + (*v0.Resource)(nil), // 30: ocis.messages.settings.v0.Resource + (*v0.Permission)(nil), // 31: ocis.messages.settings.v0.Permission (*emptypb.Empty)(nil), // 32: google.protobuf.Empty } -var file_ocis_services_settings_v1_settings_proto_depIdxs = []int32{ - 25, // 0: ocis.services.settings.v1.SaveBundleRequest.bundle:type_name -> ocis.messages.settings.v1.Bundle - 25, // 1: ocis.services.settings.v1.SaveBundleResponse.bundle:type_name -> ocis.messages.settings.v1.Bundle - 25, // 2: ocis.services.settings.v1.GetBundleResponse.bundle:type_name -> ocis.messages.settings.v1.Bundle - 25, // 3: ocis.services.settings.v1.ListBundlesResponse.bundles:type_name -> ocis.messages.settings.v1.Bundle - 26, // 4: ocis.services.settings.v1.AddSettingToBundleRequest.setting:type_name -> ocis.messages.settings.v1.Setting - 26, // 5: ocis.services.settings.v1.AddSettingToBundleResponse.setting:type_name -> ocis.messages.settings.v1.Setting - 27, // 6: ocis.services.settings.v1.SaveValueRequest.value:type_name -> ocis.messages.settings.v1.Value - 28, // 7: ocis.services.settings.v1.SaveValueResponse.value:type_name -> ocis.messages.settings.v1.ValueWithIdentifier - 28, // 8: ocis.services.settings.v1.GetValueResponse.value:type_name -> ocis.messages.settings.v1.ValueWithIdentifier - 28, // 9: ocis.services.settings.v1.ListValuesResponse.values:type_name -> ocis.messages.settings.v1.ValueWithIdentifier - 29, // 10: ocis.services.settings.v1.ListRoleAssignmentsResponse.assignments:type_name -> ocis.messages.settings.v1.UserRoleAssignment - 29, // 11: ocis.services.settings.v1.AssignRoleToUserResponse.assignment:type_name -> ocis.messages.settings.v1.UserRoleAssignment - 30, // 12: ocis.services.settings.v1.ListPermissionsByResourceRequest.resource:type_name -> ocis.messages.settings.v1.Resource - 31, // 13: ocis.services.settings.v1.ListPermissionsByResourceResponse.permissions:type_name -> ocis.messages.settings.v1.Permission - 31, // 14: ocis.services.settings.v1.GetPermissionByIDResponse.permission:type_name -> ocis.messages.settings.v1.Permission - 0, // 15: ocis.services.settings.v1.BundleService.SaveBundle:input_type -> ocis.services.settings.v1.SaveBundleRequest - 2, // 16: ocis.services.settings.v1.BundleService.GetBundle:input_type -> ocis.services.settings.v1.GetBundleRequest - 4, // 17: ocis.services.settings.v1.BundleService.ListBundles:input_type -> ocis.services.settings.v1.ListBundlesRequest - 6, // 18: ocis.services.settings.v1.BundleService.AddSettingToBundle:input_type -> ocis.services.settings.v1.AddSettingToBundleRequest - 8, // 19: ocis.services.settings.v1.BundleService.RemoveSettingFromBundle:input_type -> ocis.services.settings.v1.RemoveSettingFromBundleRequest - 9, // 20: ocis.services.settings.v1.ValueService.SaveValue:input_type -> ocis.services.settings.v1.SaveValueRequest - 11, // 21: ocis.services.settings.v1.ValueService.GetValue:input_type -> ocis.services.settings.v1.GetValueRequest - 13, // 22: ocis.services.settings.v1.ValueService.ListValues:input_type -> ocis.services.settings.v1.ListValuesRequest - 15, // 23: ocis.services.settings.v1.ValueService.GetValueByUniqueIdentifiers:input_type -> ocis.services.settings.v1.GetValueByUniqueIdentifiersRequest - 4, // 24: ocis.services.settings.v1.RoleService.ListRoles:input_type -> ocis.services.settings.v1.ListBundlesRequest - 16, // 25: ocis.services.settings.v1.RoleService.ListRoleAssignments:input_type -> ocis.services.settings.v1.ListRoleAssignmentsRequest - 18, // 26: ocis.services.settings.v1.RoleService.AssignRoleToUser:input_type -> ocis.services.settings.v1.AssignRoleToUserRequest - 20, // 27: ocis.services.settings.v1.RoleService.RemoveRoleFromUser:input_type -> ocis.services.settings.v1.RemoveRoleFromUserRequest - 21, // 28: ocis.services.settings.v1.PermissionService.ListPermissionsByResource:input_type -> ocis.services.settings.v1.ListPermissionsByResourceRequest - 23, // 29: ocis.services.settings.v1.PermissionService.GetPermissionByID:input_type -> ocis.services.settings.v1.GetPermissionByIDRequest - 1, // 30: ocis.services.settings.v1.BundleService.SaveBundle:output_type -> ocis.services.settings.v1.SaveBundleResponse - 3, // 31: ocis.services.settings.v1.BundleService.GetBundle:output_type -> ocis.services.settings.v1.GetBundleResponse - 5, // 32: ocis.services.settings.v1.BundleService.ListBundles:output_type -> ocis.services.settings.v1.ListBundlesResponse - 7, // 33: ocis.services.settings.v1.BundleService.AddSettingToBundle:output_type -> ocis.services.settings.v1.AddSettingToBundleResponse - 32, // 34: ocis.services.settings.v1.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty - 10, // 35: ocis.services.settings.v1.ValueService.SaveValue:output_type -> ocis.services.settings.v1.SaveValueResponse - 12, // 36: ocis.services.settings.v1.ValueService.GetValue:output_type -> ocis.services.settings.v1.GetValueResponse - 14, // 37: ocis.services.settings.v1.ValueService.ListValues:output_type -> ocis.services.settings.v1.ListValuesResponse - 12, // 38: ocis.services.settings.v1.ValueService.GetValueByUniqueIdentifiers:output_type -> ocis.services.settings.v1.GetValueResponse - 5, // 39: ocis.services.settings.v1.RoleService.ListRoles:output_type -> ocis.services.settings.v1.ListBundlesResponse - 17, // 40: ocis.services.settings.v1.RoleService.ListRoleAssignments:output_type -> ocis.services.settings.v1.ListRoleAssignmentsResponse - 19, // 41: ocis.services.settings.v1.RoleService.AssignRoleToUser:output_type -> ocis.services.settings.v1.AssignRoleToUserResponse - 32, // 42: ocis.services.settings.v1.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty - 22, // 43: ocis.services.settings.v1.PermissionService.ListPermissionsByResource:output_type -> ocis.services.settings.v1.ListPermissionsByResourceResponse - 24, // 44: ocis.services.settings.v1.PermissionService.GetPermissionByID:output_type -> ocis.services.settings.v1.GetPermissionByIDResponse +var file_ocis_services_settings_v0_settings_proto_depIdxs = []int32{ + 25, // 0: ocis.services.settings.v0.SaveBundleRequest.bundle:type_name -> ocis.messages.settings.v0.Bundle + 25, // 1: ocis.services.settings.v0.SaveBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle + 25, // 2: ocis.services.settings.v0.GetBundleResponse.bundle:type_name -> ocis.messages.settings.v0.Bundle + 25, // 3: ocis.services.settings.v0.ListBundlesResponse.bundles:type_name -> ocis.messages.settings.v0.Bundle + 26, // 4: ocis.services.settings.v0.AddSettingToBundleRequest.setting:type_name -> ocis.messages.settings.v0.Setting + 26, // 5: ocis.services.settings.v0.AddSettingToBundleResponse.setting:type_name -> ocis.messages.settings.v0.Setting + 27, // 6: ocis.services.settings.v0.SaveValueRequest.value:type_name -> ocis.messages.settings.v0.Value + 28, // 7: ocis.services.settings.v0.SaveValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 28, // 8: ocis.services.settings.v0.GetValueResponse.value:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 28, // 9: ocis.services.settings.v0.ListValuesResponse.values:type_name -> ocis.messages.settings.v0.ValueWithIdentifier + 29, // 10: ocis.services.settings.v0.ListRoleAssignmentsResponse.assignments:type_name -> ocis.messages.settings.v0.UserRoleAssignment + 29, // 11: ocis.services.settings.v0.AssignRoleToUserResponse.assignment:type_name -> ocis.messages.settings.v0.UserRoleAssignment + 30, // 12: ocis.services.settings.v0.ListPermissionsByResourceRequest.resource:type_name -> ocis.messages.settings.v0.Resource + 31, // 13: ocis.services.settings.v0.ListPermissionsByResourceResponse.permissions:type_name -> ocis.messages.settings.v0.Permission + 31, // 14: ocis.services.settings.v0.GetPermissionByIDResponse.permission:type_name -> ocis.messages.settings.v0.Permission + 0, // 15: ocis.services.settings.v0.BundleService.SaveBundle:input_type -> ocis.services.settings.v0.SaveBundleRequest + 2, // 16: ocis.services.settings.v0.BundleService.GetBundle:input_type -> ocis.services.settings.v0.GetBundleRequest + 4, // 17: ocis.services.settings.v0.BundleService.ListBundles:input_type -> ocis.services.settings.v0.ListBundlesRequest + 6, // 18: ocis.services.settings.v0.BundleService.AddSettingToBundle:input_type -> ocis.services.settings.v0.AddSettingToBundleRequest + 8, // 19: ocis.services.settings.v0.BundleService.RemoveSettingFromBundle:input_type -> ocis.services.settings.v0.RemoveSettingFromBundleRequest + 9, // 20: ocis.services.settings.v0.ValueService.SaveValue:input_type -> ocis.services.settings.v0.SaveValueRequest + 11, // 21: ocis.services.settings.v0.ValueService.GetValue:input_type -> ocis.services.settings.v0.GetValueRequest + 13, // 22: ocis.services.settings.v0.ValueService.ListValues:input_type -> ocis.services.settings.v0.ListValuesRequest + 15, // 23: ocis.services.settings.v0.ValueService.GetValueByUniqueIdentifiers:input_type -> ocis.services.settings.v0.GetValueByUniqueIdentifiersRequest + 4, // 24: ocis.services.settings.v0.RoleService.ListRoles:input_type -> ocis.services.settings.v0.ListBundlesRequest + 16, // 25: ocis.services.settings.v0.RoleService.ListRoleAssignments:input_type -> ocis.services.settings.v0.ListRoleAssignmentsRequest + 18, // 26: ocis.services.settings.v0.RoleService.AssignRoleToUser:input_type -> ocis.services.settings.v0.AssignRoleToUserRequest + 20, // 27: ocis.services.settings.v0.RoleService.RemoveRoleFromUser:input_type -> ocis.services.settings.v0.RemoveRoleFromUserRequest + 21, // 28: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:input_type -> ocis.services.settings.v0.ListPermissionsByResourceRequest + 23, // 29: ocis.services.settings.v0.PermissionService.GetPermissionByID:input_type -> ocis.services.settings.v0.GetPermissionByIDRequest + 1, // 30: ocis.services.settings.v0.BundleService.SaveBundle:output_type -> ocis.services.settings.v0.SaveBundleResponse + 3, // 31: ocis.services.settings.v0.BundleService.GetBundle:output_type -> ocis.services.settings.v0.GetBundleResponse + 5, // 32: ocis.services.settings.v0.BundleService.ListBundles:output_type -> ocis.services.settings.v0.ListBundlesResponse + 7, // 33: ocis.services.settings.v0.BundleService.AddSettingToBundle:output_type -> ocis.services.settings.v0.AddSettingToBundleResponse + 32, // 34: ocis.services.settings.v0.BundleService.RemoveSettingFromBundle:output_type -> google.protobuf.Empty + 10, // 35: ocis.services.settings.v0.ValueService.SaveValue:output_type -> ocis.services.settings.v0.SaveValueResponse + 12, // 36: ocis.services.settings.v0.ValueService.GetValue:output_type -> ocis.services.settings.v0.GetValueResponse + 14, // 37: ocis.services.settings.v0.ValueService.ListValues:output_type -> ocis.services.settings.v0.ListValuesResponse + 12, // 38: ocis.services.settings.v0.ValueService.GetValueByUniqueIdentifiers:output_type -> ocis.services.settings.v0.GetValueResponse + 5, // 39: ocis.services.settings.v0.RoleService.ListRoles:output_type -> ocis.services.settings.v0.ListBundlesResponse + 17, // 40: ocis.services.settings.v0.RoleService.ListRoleAssignments:output_type -> ocis.services.settings.v0.ListRoleAssignmentsResponse + 19, // 41: ocis.services.settings.v0.RoleService.AssignRoleToUser:output_type -> ocis.services.settings.v0.AssignRoleToUserResponse + 32, // 42: ocis.services.settings.v0.RoleService.RemoveRoleFromUser:output_type -> google.protobuf.Empty + 22, // 43: ocis.services.settings.v0.PermissionService.ListPermissionsByResource:output_type -> ocis.services.settings.v0.ListPermissionsByResourceResponse + 24, // 44: ocis.services.settings.v0.PermissionService.GetPermissionByID:output_type -> ocis.services.settings.v0.GetPermissionByIDResponse 30, // [30:45] is the sub-list for method output_type 15, // [15:30] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1676,13 +1676,13 @@ var file_ocis_services_settings_v1_settings_proto_depIdxs = []int32{ 0, // [0:15] is the sub-list for field type_name } -func init() { file_ocis_services_settings_v1_settings_proto_init() } -func file_ocis_services_settings_v1_settings_proto_init() { - if File_ocis_services_settings_v1_settings_proto != nil { +func init() { file_ocis_services_settings_v0_settings_proto_init() } +func file_ocis_services_settings_v0_settings_proto_init() { + if File_ocis_services_settings_v0_settings_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_services_settings_v1_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveBundleRequest); i { case 0: return &v.state @@ -1694,7 +1694,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveBundleResponse); i { case 0: return &v.state @@ -1706,7 +1706,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBundleRequest); i { case 0: return &v.state @@ -1718,7 +1718,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBundleResponse); i { case 0: return &v.state @@ -1730,7 +1730,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListBundlesRequest); i { case 0: return &v.state @@ -1742,7 +1742,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListBundlesResponse); i { case 0: return &v.state @@ -1754,7 +1754,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSettingToBundleRequest); i { case 0: return &v.state @@ -1766,7 +1766,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSettingToBundleResponse); i { case 0: return &v.state @@ -1778,7 +1778,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveSettingFromBundleRequest); i { case 0: return &v.state @@ -1790,7 +1790,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveValueRequest); i { case 0: return &v.state @@ -1802,7 +1802,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SaveValueResponse); i { case 0: return &v.state @@ -1814,7 +1814,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetValueRequest); i { case 0: return &v.state @@ -1826,7 +1826,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetValueResponse); i { case 0: return &v.state @@ -1838,7 +1838,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListValuesRequest); i { case 0: return &v.state @@ -1850,7 +1850,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListValuesResponse); i { case 0: return &v.state @@ -1862,7 +1862,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetValueByUniqueIdentifiersRequest); i { case 0: return &v.state @@ -1874,7 +1874,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRoleAssignmentsRequest); i { case 0: return &v.state @@ -1886,7 +1886,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRoleAssignmentsResponse); i { case 0: return &v.state @@ -1898,7 +1898,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AssignRoleToUserRequest); i { case 0: return &v.state @@ -1910,7 +1910,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AssignRoleToUserResponse); i { case 0: return &v.state @@ -1922,7 +1922,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveRoleFromUserRequest); i { case 0: return &v.state @@ -1934,7 +1934,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPermissionsByResourceRequest); i { case 0: return &v.state @@ -1946,7 +1946,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListPermissionsByResourceResponse); i { case 0: return &v.state @@ -1958,7 +1958,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPermissionByIDRequest); i { case 0: return &v.state @@ -1970,7 +1970,7 @@ func file_ocis_services_settings_v1_settings_proto_init() { return nil } } - file_ocis_services_settings_v1_settings_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_settings_v0_settings_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPermissionByIDResponse); i { case 0: return &v.state @@ -1987,18 +1987,18 @@ func file_ocis_services_settings_v1_settings_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_services_settings_v1_settings_proto_rawDesc, + RawDescriptor: file_ocis_services_settings_v0_settings_proto_rawDesc, NumEnums: 0, NumMessages: 25, NumExtensions: 0, NumServices: 4, }, - GoTypes: file_ocis_services_settings_v1_settings_proto_goTypes, - DependencyIndexes: file_ocis_services_settings_v1_settings_proto_depIdxs, - MessageInfos: file_ocis_services_settings_v1_settings_proto_msgTypes, + GoTypes: file_ocis_services_settings_v0_settings_proto_goTypes, + DependencyIndexes: file_ocis_services_settings_v0_settings_proto_depIdxs, + MessageInfos: file_ocis_services_settings_v0_settings_proto_msgTypes, }.Build() - File_ocis_services_settings_v1_settings_proto = out.File - file_ocis_services_settings_v1_settings_proto_rawDesc = nil - file_ocis_services_settings_v1_settings_proto_goTypes = nil - file_ocis_services_settings_v1_settings_proto_depIdxs = nil + File_ocis_services_settings_v0_settings_proto = out.File + file_ocis_services_settings_v0_settings_proto_rawDesc = nil + file_ocis_services_settings_v0_settings_proto_goTypes = nil + file_ocis_services_settings_v0_settings_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go similarity index 99% rename from protogen/gen/ocis/services/settings/v1/settings.pb.micro.go rename to protogen/gen/ocis/services/settings/v0/settings.pb.micro.go index d6e7ece4cb6..fedae644826 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.micro.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.micro.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/services/settings/v1/settings.proto +// source: ocis/services/settings/v0/settings.proto -package v1 +package v0 import ( fmt "fmt" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" _ "google.golang.org/genproto/googleapis/api/annotations" proto "google.golang.org/protobuf/proto" emptypb "google.golang.org/protobuf/types/known/emptypb" diff --git a/protogen/gen/ocis/services/settings/v1/settings.pb.web.go b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go similarity index 99% rename from protogen/gen/ocis/services/settings/v1/settings.pb.web.go rename to protogen/gen/ocis/services/settings/v0/settings.pb.web.go index b6de3fcbd40..bcad905cce4 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.pb.web.go +++ b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: v1.proto +// source: v0.proto -package v1 +package v0 import ( "bytes" diff --git a/protogen/gen/ocis/services/settings/v1/settings.swagger.json b/protogen/gen/ocis/services/settings/v0/settings.swagger.json similarity index 81% rename from protogen/gen/ocis/services/settings/v1/settings.swagger.json rename to protogen/gen/ocis/services/settings/v0/settings.swagger.json index b0e93656de1..4d2db4d52cf 100644 --- a/protogen/gen/ocis/services/settings/v1/settings.swagger.json +++ b/protogen/gen/ocis/services/settings/v0/settings.swagger.json @@ -45,7 +45,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1AssignRoleToUserResponse" + "$ref": "#/definitions/v0AssignRoleToUserResponse" } }, "default": { @@ -61,7 +61,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1AssignRoleToUserRequest" + "$ref": "#/definitions/v0AssignRoleToUserRequest" } } ], @@ -77,7 +77,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListRoleAssignmentsResponse" + "$ref": "#/definitions/v0ListRoleAssignmentsResponse" } }, "default": { @@ -93,7 +93,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListRoleAssignmentsRequest" + "$ref": "#/definitions/v0ListRoleAssignmentsRequest" } } ], @@ -125,7 +125,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1RemoveRoleFromUserRequest" + "$ref": "#/definitions/v0RemoveRoleFromUserRequest" } } ], @@ -141,7 +141,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetBundleResponse" + "$ref": "#/definitions/v0GetBundleResponse" } }, "default": { @@ -157,7 +157,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetBundleRequest" + "$ref": "#/definitions/v0GetBundleRequest" } } ], @@ -173,7 +173,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SaveBundleResponse" + "$ref": "#/definitions/v0SaveBundleResponse" } }, "default": { @@ -189,7 +189,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1SaveBundleRequest" + "$ref": "#/definitions/v0SaveBundleRequest" } } ], @@ -205,7 +205,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1AddSettingToBundleResponse" + "$ref": "#/definitions/v0AddSettingToBundleResponse" } }, "default": { @@ -221,7 +221,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1AddSettingToBundleRequest" + "$ref": "#/definitions/v0AddSettingToBundleRequest" } } ], @@ -237,7 +237,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListBundlesResponse" + "$ref": "#/definitions/v0ListBundlesResponse" } }, "default": { @@ -253,7 +253,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListBundlesRequest" + "$ref": "#/definitions/v0ListBundlesRequest" } } ], @@ -285,7 +285,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1RemoveSettingFromBundleRequest" + "$ref": "#/definitions/v0RemoveSettingFromBundleRequest" } } ], @@ -301,7 +301,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetPermissionByIDResponse" + "$ref": "#/definitions/v0GetPermissionByIDResponse" } }, "default": { @@ -317,7 +317,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetPermissionByIDRequest" + "$ref": "#/definitions/v0GetPermissionByIDRequest" } } ], @@ -333,7 +333,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListPermissionsByResourceResponse" + "$ref": "#/definitions/v0ListPermissionsByResourceResponse" } }, "default": { @@ -349,7 +349,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListPermissionsByResourceRequest" + "$ref": "#/definitions/v0ListPermissionsByResourceRequest" } } ], @@ -365,7 +365,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListBundlesResponse" + "$ref": "#/definitions/v0ListBundlesResponse" } }, "default": { @@ -381,7 +381,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListBundlesRequest" + "$ref": "#/definitions/v0ListBundlesRequest" } } ], @@ -397,7 +397,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetValueResponse" + "$ref": "#/definitions/v0GetValueResponse" } }, "default": { @@ -413,7 +413,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetValueRequest" + "$ref": "#/definitions/v0GetValueRequest" } } ], @@ -429,7 +429,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetValueResponse" + "$ref": "#/definitions/v0GetValueResponse" } }, "default": { @@ -445,7 +445,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1GetValueByUniqueIdentifiersRequest" + "$ref": "#/definitions/v0GetValueByUniqueIdentifiersRequest" } } ], @@ -461,7 +461,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListValuesResponse" + "$ref": "#/definitions/v0ListValuesResponse" } }, "default": { @@ -477,7 +477,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1ListValuesRequest" + "$ref": "#/definitions/v0ListValuesRequest" } } ], @@ -493,7 +493,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SaveValueResponse" + "$ref": "#/definitions/v0SaveValueResponse" } }, "default": { @@ -509,7 +509,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1SaveValueRequest" + "$ref": "#/definitions/v0SaveValueRequest" } } ], @@ -557,18 +557,18 @@ } } }, - "settingsv1ListValue": { + "settingsv0ListValue": { "type": "object", "properties": { "values": { "type": "array", "items": { - "$ref": "#/definitions/v1ListOptionValue" + "$ref": "#/definitions/v0ListOptionValue" } } } }, - "settingsv1Value": { + "settingsv0Value": { "type": "object", "properties": { "id": { @@ -586,7 +586,7 @@ "type": "string" }, "resource": { - "$ref": "#/definitions/v1Resource" + "$ref": "#/definitions/v0Resource" }, "boolValue": { "type": "boolean" @@ -599,30 +599,30 @@ "type": "string" }, "listValue": { - "$ref": "#/definitions/settingsv1ListValue" + "$ref": "#/definitions/settingsv0ListValue" } } }, - "v1AddSettingToBundleRequest": { + "v0AddSettingToBundleRequest": { "type": "object", "properties": { "bundleId": { "type": "string" }, "setting": { - "$ref": "#/definitions/v1Setting" + "$ref": "#/definitions/v0Setting" } } }, - "v1AddSettingToBundleResponse": { + "v0AddSettingToBundleResponse": { "type": "object", "properties": { "setting": { - "$ref": "#/definitions/v1Setting" + "$ref": "#/definitions/v0Setting" } } }, - "v1AssignRoleToUserRequest": { + "v0AssignRoleToUserRequest": { "type": "object", "properties": { "accountUuid": { @@ -634,15 +634,15 @@ } } }, - "v1AssignRoleToUserResponse": { + "v0AssignRoleToUserResponse": { "type": "object", "properties": { "assignment": { - "$ref": "#/definitions/v1UserRoleAssignment" + "$ref": "#/definitions/v0UserRoleAssignment" } } }, - "v1Bool": { + "v0Bool": { "type": "object", "properties": { "default": { @@ -653,7 +653,7 @@ } } }, - "v1Bundle": { + "v0Bundle": { "type": "object", "properties": { "id": { @@ -663,7 +663,7 @@ "type": "string" }, "type": { - "$ref": "#/definitions/v1BundleType" + "$ref": "#/definitions/v0BundleType" }, "extension": { "type": "string" @@ -674,15 +674,15 @@ "settings": { "type": "array", "items": { - "$ref": "#/definitions/v1Setting" + "$ref": "#/definitions/v0Setting" } }, "resource": { - "$ref": "#/definitions/v1Resource" + "$ref": "#/definitions/v0Resource" } } }, - "v1BundleType": { + "v0BundleType": { "type": "string", "enum": [ "TYPE_UNKNOWN", @@ -691,7 +691,7 @@ ], "default": "TYPE_UNKNOWN" }, - "v1GetBundleRequest": { + "v0GetBundleRequest": { "type": "object", "properties": { "bundleId": { @@ -699,15 +699,15 @@ } } }, - "v1GetBundleResponse": { + "v0GetBundleResponse": { "type": "object", "properties": { "bundle": { - "$ref": "#/definitions/v1Bundle" + "$ref": "#/definitions/v0Bundle" } } }, - "v1GetPermissionByIDRequest": { + "v0GetPermissionByIDRequest": { "type": "object", "properties": { "permissionId": { @@ -715,15 +715,15 @@ } } }, - "v1GetPermissionByIDResponse": { + "v0GetPermissionByIDResponse": { "type": "object", "properties": { "permission": { - "$ref": "#/definitions/v1Permission" + "$ref": "#/definitions/v0Permission" } } }, - "v1GetValueByUniqueIdentifiersRequest": { + "v0GetValueByUniqueIdentifiersRequest": { "type": "object", "properties": { "accountUuid": { @@ -734,7 +734,7 @@ } } }, - "v1GetValueRequest": { + "v0GetValueRequest": { "type": "object", "properties": { "id": { @@ -742,15 +742,15 @@ } } }, - "v1GetValueResponse": { + "v0GetValueResponse": { "type": "object", "properties": { "value": { - "$ref": "#/definitions/v1ValueWithIdentifier" + "$ref": "#/definitions/v0ValueWithIdentifier" } } }, - "v1Identifier": { + "v0Identifier": { "type": "object", "properties": { "extension": { @@ -764,7 +764,7 @@ } } }, - "v1Int": { + "v0Int": { "type": "object", "properties": { "default": { @@ -788,7 +788,7 @@ } } }, - "v1ListBundlesRequest": { + "v0ListBundlesRequest": { "type": "object", "properties": { "bundleIds": { @@ -799,22 +799,22 @@ } } }, - "v1ListBundlesResponse": { + "v0ListBundlesResponse": { "type": "object", "properties": { "bundles": { "type": "array", "items": { - "$ref": "#/definitions/v1Bundle" + "$ref": "#/definitions/v0Bundle" } } } }, - "v1ListOption": { + "v0ListOption": { "type": "object", "properties": { "value": { - "$ref": "#/definitions/v1ListOptionValue" + "$ref": "#/definitions/v0ListOptionValue" }, "default": { "type": "boolean" @@ -824,7 +824,7 @@ } } }, - "v1ListOptionValue": { + "v0ListOptionValue": { "type": "object", "properties": { "stringValue": { @@ -836,26 +836,26 @@ } } }, - "v1ListPermissionsByResourceRequest": { + "v0ListPermissionsByResourceRequest": { "type": "object", "properties": { "resource": { - "$ref": "#/definitions/v1Resource" + "$ref": "#/definitions/v0Resource" } } }, - "v1ListPermissionsByResourceResponse": { + "v0ListPermissionsByResourceResponse": { "type": "object", "properties": { "permissions": { "type": "array", "items": { - "$ref": "#/definitions/v1Permission" + "$ref": "#/definitions/v0Permission" } } } }, - "v1ListRoleAssignmentsRequest": { + "v0ListRoleAssignmentsRequest": { "type": "object", "properties": { "accountUuid": { @@ -863,18 +863,18 @@ } } }, - "v1ListRoleAssignmentsResponse": { + "v0ListRoleAssignmentsResponse": { "type": "object", "properties": { "assignments": { "type": "array", "items": { - "$ref": "#/definitions/v1UserRoleAssignment" + "$ref": "#/definitions/v0UserRoleAssignment" } } } }, - "v1ListValuesRequest": { + "v0ListValuesRequest": { "type": "object", "properties": { "bundleId": { @@ -885,40 +885,40 @@ } } }, - "v1ListValuesResponse": { + "v0ListValuesResponse": { "type": "object", "properties": { "values": { "type": "array", "items": { - "$ref": "#/definitions/v1ValueWithIdentifier" + "$ref": "#/definitions/v0ValueWithIdentifier" } } } }, - "v1MultiChoiceList": { + "v0MultiChoiceList": { "type": "object", "properties": { "options": { "type": "array", "items": { - "$ref": "#/definitions/v1ListOption" + "$ref": "#/definitions/v0ListOption" } } } }, - "v1Permission": { + "v0Permission": { "type": "object", "properties": { "operation": { - "$ref": "#/definitions/v1PermissionOperation" + "$ref": "#/definitions/v0PermissionOperation" }, "constraint": { "$ref": "#/definitions/PermissionConstraint" } } }, - "v1PermissionOperation": { + "v0PermissionOperation": { "type": "string", "enum": [ "OPERATION_UNKNOWN", @@ -931,7 +931,7 @@ ], "default": "OPERATION_UNKNOWN" }, - "v1RemoveRoleFromUserRequest": { + "v0RemoveRoleFromUserRequest": { "type": "object", "properties": { "id": { @@ -939,7 +939,7 @@ } } }, - "v1RemoveSettingFromBundleRequest": { + "v0RemoveSettingFromBundleRequest": { "type": "object", "properties": { "bundleId": { @@ -950,18 +950,18 @@ } } }, - "v1Resource": { + "v0Resource": { "type": "object", "properties": { "type": { - "$ref": "#/definitions/v1ResourceType" + "$ref": "#/definitions/v0ResourceType" }, "id": { "type": "string" } } }, - "v1ResourceType": { + "v0ResourceType": { "type": "string", "enum": [ "TYPE_UNKNOWN", @@ -975,40 +975,40 @@ ], "default": "TYPE_UNKNOWN" }, - "v1SaveBundleRequest": { + "v0SaveBundleRequest": { "type": "object", "properties": { "bundle": { - "$ref": "#/definitions/v1Bundle" + "$ref": "#/definitions/v0Bundle" } }, "title": "---\nrequests and responses for settings bundles\n---" }, - "v1SaveBundleResponse": { + "v0SaveBundleResponse": { "type": "object", "properties": { "bundle": { - "$ref": "#/definitions/v1Bundle" + "$ref": "#/definitions/v0Bundle" } } }, - "v1SaveValueRequest": { + "v0SaveValueRequest": { "type": "object", "properties": { "value": { - "$ref": "#/definitions/settingsv1Value" + "$ref": "#/definitions/settingsv0Value" } } }, - "v1SaveValueResponse": { + "v0SaveValueResponse": { "type": "object", "properties": { "value": { - "$ref": "#/definitions/v1ValueWithIdentifier" + "$ref": "#/definitions/v0ValueWithIdentifier" } } }, - "v1Setting": { + "v0Setting": { "type": "object", "properties": { "id": { @@ -1024,40 +1024,40 @@ "type": "string" }, "intValue": { - "$ref": "#/definitions/v1Int" + "$ref": "#/definitions/v0Int" }, "stringValue": { - "$ref": "#/definitions/v1String" + "$ref": "#/definitions/v0String" }, "boolValue": { - "$ref": "#/definitions/v1Bool" + "$ref": "#/definitions/v0Bool" }, "singleChoiceValue": { - "$ref": "#/definitions/v1SingleChoiceList" + "$ref": "#/definitions/v0SingleChoiceList" }, "multiChoiceValue": { - "$ref": "#/definitions/v1MultiChoiceList" + "$ref": "#/definitions/v0MultiChoiceList" }, "permissionValue": { - "$ref": "#/definitions/v1Permission" + "$ref": "#/definitions/v0Permission" }, "resource": { - "$ref": "#/definitions/v1Resource" + "$ref": "#/definitions/v0Resource" } } }, - "v1SingleChoiceList": { + "v0SingleChoiceList": { "type": "object", "properties": { "options": { "type": "array", "items": { - "$ref": "#/definitions/v1ListOption" + "$ref": "#/definitions/v0ListOption" } } } }, - "v1String": { + "v0String": { "type": "object", "properties": { "default": { @@ -1079,7 +1079,7 @@ } } }, - "v1UserRoleAssignment": { + "v0UserRoleAssignment": { "type": "object", "properties": { "id": { @@ -1095,14 +1095,14 @@ } } }, - "v1ValueWithIdentifier": { + "v0ValueWithIdentifier": { "type": "object", "properties": { "identifier": { - "$ref": "#/definitions/v1Identifier" + "$ref": "#/definitions/v0Identifier" }, "value": { - "$ref": "#/definitions/settingsv1Value" + "$ref": "#/definitions/settingsv0Value" } } } diff --git a/protogen/gen/ocis/services/store/v1/store.pb.go b/protogen/gen/ocis/services/store/v0/store.pb.go similarity index 73% rename from protogen/gen/ocis/services/store/v1/store.pb.go rename to protogen/gen/ocis/services/store/v0/store.pb.go index 1e20e0580b1..5dd2fc43648 100644 --- a/protogen/gen/ocis/services/store/v1/store.pb.go +++ b/protogen/gen/ocis/services/store/v0/store.pb.go @@ -2,13 +2,13 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/services/store/v1/store.proto +// source: ocis/services/store/v0/store.proto -package v1 +package v0 import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -28,13 +28,13 @@ type ReadRequest struct { unknownFields protoimpl.UnknownFields Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Options *v1.ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + Options *v0.ReadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` } func (x *ReadRequest) Reset() { *x = ReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[0] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *ReadRequest) String() string { func (*ReadRequest) ProtoMessage() {} func (x *ReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[0] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *ReadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead. func (*ReadRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{0} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{0} } func (x *ReadRequest) GetKey() string { @@ -70,7 +70,7 @@ func (x *ReadRequest) GetKey() string { return "" } -func (x *ReadRequest) GetOptions() *v1.ReadOptions { +func (x *ReadRequest) GetOptions() *v0.ReadOptions { if x != nil { return x.Options } @@ -82,13 +82,13 @@ type ReadResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Records []*v1.Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` + Records []*v0.Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` } func (x *ReadResponse) Reset() { *x = ReadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[1] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +101,7 @@ func (x *ReadResponse) String() string { func (*ReadResponse) ProtoMessage() {} func (x *ReadResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[1] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,10 +114,10 @@ func (x *ReadResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead. func (*ReadResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{1} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{1} } -func (x *ReadResponse) GetRecords() []*v1.Record { +func (x *ReadResponse) GetRecords() []*v0.Record { if x != nil { return x.Records } @@ -129,14 +129,14 @@ type WriteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Record *v1.Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` - Options *v1.WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + Record *v0.Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` + Options *v0.WriteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` } func (x *WriteRequest) Reset() { *x = WriteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[2] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -149,7 +149,7 @@ func (x *WriteRequest) String() string { func (*WriteRequest) ProtoMessage() {} func (x *WriteRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[2] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -162,17 +162,17 @@ func (x *WriteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead. func (*WriteRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{2} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{2} } -func (x *WriteRequest) GetRecord() *v1.Record { +func (x *WriteRequest) GetRecord() *v0.Record { if x != nil { return x.Record } return nil } -func (x *WriteRequest) GetOptions() *v1.WriteOptions { +func (x *WriteRequest) GetOptions() *v0.WriteOptions { if x != nil { return x.Options } @@ -188,7 +188,7 @@ type WriteResponse struct { func (x *WriteResponse) Reset() { *x = WriteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[3] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -201,7 +201,7 @@ func (x *WriteResponse) String() string { func (*WriteResponse) ProtoMessage() {} func (x *WriteResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[3] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -214,7 +214,7 @@ func (x *WriteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead. func (*WriteResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{3} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{3} } type DeleteRequest struct { @@ -223,13 +223,13 @@ type DeleteRequest struct { unknownFields protoimpl.UnknownFields Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Options *v1.DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` + Options *v0.DeleteOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` } func (x *DeleteRequest) Reset() { *x = DeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[4] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -242,7 +242,7 @@ func (x *DeleteRequest) String() string { func (*DeleteRequest) ProtoMessage() {} func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[4] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -255,7 +255,7 @@ func (x *DeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{4} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{4} } func (x *DeleteRequest) GetKey() string { @@ -265,7 +265,7 @@ func (x *DeleteRequest) GetKey() string { return "" } -func (x *DeleteRequest) GetOptions() *v1.DeleteOptions { +func (x *DeleteRequest) GetOptions() *v0.DeleteOptions { if x != nil { return x.Options } @@ -281,7 +281,7 @@ type DeleteResponse struct { func (x *DeleteResponse) Reset() { *x = DeleteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[5] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -294,7 +294,7 @@ func (x *DeleteResponse) String() string { func (*DeleteResponse) ProtoMessage() {} func (x *DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[5] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -307,7 +307,7 @@ func (x *DeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. func (*DeleteResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{5} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{5} } type ListRequest struct { @@ -315,13 +315,13 @@ type ListRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Options *v1.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` + Options *v0.ListOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` } func (x *ListRequest) Reset() { *x = ListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[6] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -334,7 +334,7 @@ func (x *ListRequest) String() string { func (*ListRequest) ProtoMessage() {} func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[6] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -347,10 +347,10 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. func (*ListRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{6} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{6} } -func (x *ListRequest) GetOptions() *v1.ListOptions { +func (x *ListRequest) GetOptions() *v0.ListOptions { if x != nil { return x.Options } @@ -368,7 +368,7 @@ type ListResponse struct { func (x *ListResponse) Reset() { *x = ListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[7] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -381,7 +381,7 @@ func (x *ListResponse) String() string { func (*ListResponse) ProtoMessage() {} func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[7] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -394,7 +394,7 @@ func (x *ListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. func (*ListResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{7} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{7} } func (x *ListResponse) GetKeys() []string { @@ -413,7 +413,7 @@ type DatabasesRequest struct { func (x *DatabasesRequest) Reset() { *x = DatabasesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[8] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -426,7 +426,7 @@ func (x *DatabasesRequest) String() string { func (*DatabasesRequest) ProtoMessage() {} func (x *DatabasesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[8] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -439,7 +439,7 @@ func (x *DatabasesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DatabasesRequest.ProtoReflect.Descriptor instead. func (*DatabasesRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{8} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{8} } type DatabasesResponse struct { @@ -453,7 +453,7 @@ type DatabasesResponse struct { func (x *DatabasesResponse) Reset() { *x = DatabasesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[9] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -466,7 +466,7 @@ func (x *DatabasesResponse) String() string { func (*DatabasesResponse) ProtoMessage() {} func (x *DatabasesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[9] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -479,7 +479,7 @@ func (x *DatabasesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DatabasesResponse.ProtoReflect.Descriptor instead. func (*DatabasesResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{9} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{9} } func (x *DatabasesResponse) GetDatabases() []string { @@ -500,7 +500,7 @@ type TablesRequest struct { func (x *TablesRequest) Reset() { *x = TablesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[10] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -513,7 +513,7 @@ func (x *TablesRequest) String() string { func (*TablesRequest) ProtoMessage() {} func (x *TablesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[10] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -526,7 +526,7 @@ func (x *TablesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TablesRequest.ProtoReflect.Descriptor instead. func (*TablesRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{10} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{10} } func (x *TablesRequest) GetDatabase() string { @@ -547,7 +547,7 @@ type TablesResponse struct { func (x *TablesResponse) Reset() { *x = TablesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[11] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -560,7 +560,7 @@ func (x *TablesResponse) String() string { func (*TablesResponse) ProtoMessage() {} func (x *TablesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_store_v1_store_proto_msgTypes[11] + mi := &file_ocis_services_store_v0_store_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -573,7 +573,7 @@ func (x *TablesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TablesResponse.ProtoReflect.Descriptor instead. func (*TablesResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_store_v1_store_proto_rawDescGZIP(), []int{11} + return file_ocis_services_store_v0_store_proto_rawDescGZIP(), []int{11} } func (x *TablesResponse) GetTables() []string { @@ -583,15 +583,15 @@ func (x *TablesResponse) GetTables() []string { return nil } -var File_ocis_services_store_v1_store_proto protoreflect.FileDescriptor +var File_ocis_services_store_v0_store_proto protoreflect.FileDescriptor -var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ +var file_ocis_services_store_v0_store_proto_rawDesc = []byte{ 0x0a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x22, 0x6f, 0x63, + 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x1a, 0x22, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x65, 0x2f, 0x76, 0x30, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 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, @@ -599,20 +599,20 @@ var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x48, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, + 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, @@ -620,13 +620,13 @@ var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x4a, 0x04, 0x08, 0x01, @@ -642,43 +642,43 @@ var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x32, 0xa5, 0x04, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x56, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, + 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x62, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x06, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x30, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xdb, 0x02, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x9a, 0x02, 0x12, 0xb3, 0x01, 0x0a, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x30, 0x92, 0x41, 0x9a, 0x02, 0x12, 0xb3, 0x01, 0x0a, 0x1d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, 0x12, @@ -700,56 +700,56 @@ var file_ocis_services_store_v1_store_proto_rawDesc = []byte{ } var ( - file_ocis_services_store_v1_store_proto_rawDescOnce sync.Once - file_ocis_services_store_v1_store_proto_rawDescData = file_ocis_services_store_v1_store_proto_rawDesc + file_ocis_services_store_v0_store_proto_rawDescOnce sync.Once + file_ocis_services_store_v0_store_proto_rawDescData = file_ocis_services_store_v0_store_proto_rawDesc ) -func file_ocis_services_store_v1_store_proto_rawDescGZIP() []byte { - file_ocis_services_store_v1_store_proto_rawDescOnce.Do(func() { - file_ocis_services_store_v1_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_store_v1_store_proto_rawDescData) +func file_ocis_services_store_v0_store_proto_rawDescGZIP() []byte { + file_ocis_services_store_v0_store_proto_rawDescOnce.Do(func() { + file_ocis_services_store_v0_store_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_store_v0_store_proto_rawDescData) }) - return file_ocis_services_store_v1_store_proto_rawDescData -} - -var file_ocis_services_store_v1_store_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_ocis_services_store_v1_store_proto_goTypes = []interface{}{ - (*ReadRequest)(nil), // 0: ocis.services.store.v1.ReadRequest - (*ReadResponse)(nil), // 1: ocis.services.store.v1.ReadResponse - (*WriteRequest)(nil), // 2: ocis.services.store.v1.WriteRequest - (*WriteResponse)(nil), // 3: ocis.services.store.v1.WriteResponse - (*DeleteRequest)(nil), // 4: ocis.services.store.v1.DeleteRequest - (*DeleteResponse)(nil), // 5: ocis.services.store.v1.DeleteResponse - (*ListRequest)(nil), // 6: ocis.services.store.v1.ListRequest - (*ListResponse)(nil), // 7: ocis.services.store.v1.ListResponse - (*DatabasesRequest)(nil), // 8: ocis.services.store.v1.DatabasesRequest - (*DatabasesResponse)(nil), // 9: ocis.services.store.v1.DatabasesResponse - (*TablesRequest)(nil), // 10: ocis.services.store.v1.TablesRequest - (*TablesResponse)(nil), // 11: ocis.services.store.v1.TablesResponse - (*v1.ReadOptions)(nil), // 12: ocis.messages.store.v1.ReadOptions - (*v1.Record)(nil), // 13: ocis.messages.store.v1.Record - (*v1.WriteOptions)(nil), // 14: ocis.messages.store.v1.WriteOptions - (*v1.DeleteOptions)(nil), // 15: ocis.messages.store.v1.DeleteOptions - (*v1.ListOptions)(nil), // 16: ocis.messages.store.v1.ListOptions -} -var file_ocis_services_store_v1_store_proto_depIdxs = []int32{ - 12, // 0: ocis.services.store.v1.ReadRequest.options:type_name -> ocis.messages.store.v1.ReadOptions - 13, // 1: ocis.services.store.v1.ReadResponse.records:type_name -> ocis.messages.store.v1.Record - 13, // 2: ocis.services.store.v1.WriteRequest.record:type_name -> ocis.messages.store.v1.Record - 14, // 3: ocis.services.store.v1.WriteRequest.options:type_name -> ocis.messages.store.v1.WriteOptions - 15, // 4: ocis.services.store.v1.DeleteRequest.options:type_name -> ocis.messages.store.v1.DeleteOptions - 16, // 5: ocis.services.store.v1.ListRequest.options:type_name -> ocis.messages.store.v1.ListOptions - 0, // 6: ocis.services.store.v1.Store.Read:input_type -> ocis.services.store.v1.ReadRequest - 2, // 7: ocis.services.store.v1.Store.Write:input_type -> ocis.services.store.v1.WriteRequest - 4, // 8: ocis.services.store.v1.Store.Delete:input_type -> ocis.services.store.v1.DeleteRequest - 6, // 9: ocis.services.store.v1.Store.List:input_type -> ocis.services.store.v1.ListRequest - 8, // 10: ocis.services.store.v1.Store.Databases:input_type -> ocis.services.store.v1.DatabasesRequest - 10, // 11: ocis.services.store.v1.Store.Tables:input_type -> ocis.services.store.v1.TablesRequest - 1, // 12: ocis.services.store.v1.Store.Read:output_type -> ocis.services.store.v1.ReadResponse - 3, // 13: ocis.services.store.v1.Store.Write:output_type -> ocis.services.store.v1.WriteResponse - 5, // 14: ocis.services.store.v1.Store.Delete:output_type -> ocis.services.store.v1.DeleteResponse - 7, // 15: ocis.services.store.v1.Store.List:output_type -> ocis.services.store.v1.ListResponse - 9, // 16: ocis.services.store.v1.Store.Databases:output_type -> ocis.services.store.v1.DatabasesResponse - 11, // 17: ocis.services.store.v1.Store.Tables:output_type -> ocis.services.store.v1.TablesResponse + return file_ocis_services_store_v0_store_proto_rawDescData +} + +var file_ocis_services_store_v0_store_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_ocis_services_store_v0_store_proto_goTypes = []interface{}{ + (*ReadRequest)(nil), // 0: ocis.services.store.v0.ReadRequest + (*ReadResponse)(nil), // 1: ocis.services.store.v0.ReadResponse + (*WriteRequest)(nil), // 2: ocis.services.store.v0.WriteRequest + (*WriteResponse)(nil), // 3: ocis.services.store.v0.WriteResponse + (*DeleteRequest)(nil), // 4: ocis.services.store.v0.DeleteRequest + (*DeleteResponse)(nil), // 5: ocis.services.store.v0.DeleteResponse + (*ListRequest)(nil), // 6: ocis.services.store.v0.ListRequest + (*ListResponse)(nil), // 7: ocis.services.store.v0.ListResponse + (*DatabasesRequest)(nil), // 8: ocis.services.store.v0.DatabasesRequest + (*DatabasesResponse)(nil), // 9: ocis.services.store.v0.DatabasesResponse + (*TablesRequest)(nil), // 10: ocis.services.store.v0.TablesRequest + (*TablesResponse)(nil), // 11: ocis.services.store.v0.TablesResponse + (*v0.ReadOptions)(nil), // 12: ocis.messages.store.v0.ReadOptions + (*v0.Record)(nil), // 13: ocis.messages.store.v0.Record + (*v0.WriteOptions)(nil), // 14: ocis.messages.store.v0.WriteOptions + (*v0.DeleteOptions)(nil), // 15: ocis.messages.store.v0.DeleteOptions + (*v0.ListOptions)(nil), // 16: ocis.messages.store.v0.ListOptions +} +var file_ocis_services_store_v0_store_proto_depIdxs = []int32{ + 12, // 0: ocis.services.store.v0.ReadRequest.options:type_name -> ocis.messages.store.v0.ReadOptions + 13, // 1: ocis.services.store.v0.ReadResponse.records:type_name -> ocis.messages.store.v0.Record + 13, // 2: ocis.services.store.v0.WriteRequest.record:type_name -> ocis.messages.store.v0.Record + 14, // 3: ocis.services.store.v0.WriteRequest.options:type_name -> ocis.messages.store.v0.WriteOptions + 15, // 4: ocis.services.store.v0.DeleteRequest.options:type_name -> ocis.messages.store.v0.DeleteOptions + 16, // 5: ocis.services.store.v0.ListRequest.options:type_name -> ocis.messages.store.v0.ListOptions + 0, // 6: ocis.services.store.v0.Store.Read:input_type -> ocis.services.store.v0.ReadRequest + 2, // 7: ocis.services.store.v0.Store.Write:input_type -> ocis.services.store.v0.WriteRequest + 4, // 8: ocis.services.store.v0.Store.Delete:input_type -> ocis.services.store.v0.DeleteRequest + 6, // 9: ocis.services.store.v0.Store.List:input_type -> ocis.services.store.v0.ListRequest + 8, // 10: ocis.services.store.v0.Store.Databases:input_type -> ocis.services.store.v0.DatabasesRequest + 10, // 11: ocis.services.store.v0.Store.Tables:input_type -> ocis.services.store.v0.TablesRequest + 1, // 12: ocis.services.store.v0.Store.Read:output_type -> ocis.services.store.v0.ReadResponse + 3, // 13: ocis.services.store.v0.Store.Write:output_type -> ocis.services.store.v0.WriteResponse + 5, // 14: ocis.services.store.v0.Store.Delete:output_type -> ocis.services.store.v0.DeleteResponse + 7, // 15: ocis.services.store.v0.Store.List:output_type -> ocis.services.store.v0.ListResponse + 9, // 16: ocis.services.store.v0.Store.Databases:output_type -> ocis.services.store.v0.DatabasesResponse + 11, // 17: ocis.services.store.v0.Store.Tables:output_type -> ocis.services.store.v0.TablesResponse 12, // [12:18] is the sub-list for method output_type 6, // [6:12] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -757,13 +757,13 @@ var file_ocis_services_store_v1_store_proto_depIdxs = []int32{ 0, // [0:6] is the sub-list for field type_name } -func init() { file_ocis_services_store_v1_store_proto_init() } -func file_ocis_services_store_v1_store_proto_init() { - if File_ocis_services_store_v1_store_proto != nil { +func init() { file_ocis_services_store_v0_store_proto_init() } +func file_ocis_services_store_v0_store_proto_init() { + if File_ocis_services_store_v0_store_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_services_store_v1_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReadRequest); i { case 0: return &v.state @@ -775,7 +775,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReadResponse); i { case 0: return &v.state @@ -787,7 +787,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteRequest); i { case 0: return &v.state @@ -799,7 +799,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteResponse); i { case 0: return &v.state @@ -811,7 +811,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRequest); i { case 0: return &v.state @@ -823,7 +823,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteResponse); i { case 0: return &v.state @@ -835,7 +835,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRequest); i { case 0: return &v.state @@ -847,7 +847,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListResponse); i { case 0: return &v.state @@ -859,7 +859,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DatabasesRequest); i { case 0: return &v.state @@ -871,7 +871,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DatabasesResponse); i { case 0: return &v.state @@ -883,7 +883,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TablesRequest); i { case 0: return &v.state @@ -895,7 +895,7 @@ func file_ocis_services_store_v1_store_proto_init() { return nil } } - file_ocis_services_store_v1_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_store_v0_store_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TablesResponse); i { case 0: return &v.state @@ -912,18 +912,18 @@ func file_ocis_services_store_v1_store_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_services_store_v1_store_proto_rawDesc, + RawDescriptor: file_ocis_services_store_v0_store_proto_rawDesc, NumEnums: 0, NumMessages: 12, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_ocis_services_store_v1_store_proto_goTypes, - DependencyIndexes: file_ocis_services_store_v1_store_proto_depIdxs, - MessageInfos: file_ocis_services_store_v1_store_proto_msgTypes, + GoTypes: file_ocis_services_store_v0_store_proto_goTypes, + DependencyIndexes: file_ocis_services_store_v0_store_proto_depIdxs, + MessageInfos: file_ocis_services_store_v0_store_proto_msgTypes, }.Build() - File_ocis_services_store_v1_store_proto = out.File - file_ocis_services_store_v1_store_proto_rawDesc = nil - file_ocis_services_store_v1_store_proto_goTypes = nil - file_ocis_services_store_v1_store_proto_depIdxs = nil + File_ocis_services_store_v0_store_proto = out.File + file_ocis_services_store_v0_store_proto_rawDesc = nil + file_ocis_services_store_v0_store_proto_goTypes = nil + file_ocis_services_store_v0_store_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/services/store/v1/store.pb.micro.go b/protogen/gen/ocis/services/store/v0/store.pb.micro.go similarity index 98% rename from protogen/gen/ocis/services/store/v1/store.pb.micro.go rename to protogen/gen/ocis/services/store/v0/store.pb.micro.go index d9dd1ce4e38..308060106f8 100644 --- a/protogen/gen/ocis/services/store/v1/store.pb.micro.go +++ b/protogen/gen/ocis/services/store/v0/store.pb.micro.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/services/store/v1/store.proto +// source: ocis/services/store/v0/store.proto -package v1 +package v0 import ( fmt "fmt" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0" proto "google.golang.org/protobuf/proto" math "math" ) diff --git a/protogen/gen/ocis/services/store/v1/store.swagger.json b/protogen/gen/ocis/services/store/v0/store.swagger.json similarity index 91% rename from protogen/gen/ocis/services/store/v1/store.swagger.json rename to protogen/gen/ocis/services/store/v0/store.swagger.json index 14f5a2ba498..2beaed54c48 100644 --- a/protogen/gen/ocis/services/store/v1/store.swagger.json +++ b/protogen/gen/ocis/services/store/v0/store.swagger.json @@ -57,7 +57,7 @@ } } }, - "v1DatabasesResponse": { + "v0DatabasesResponse": { "type": "object", "properties": { "databases": { @@ -68,7 +68,7 @@ } } }, - "v1DeleteOptions": { + "v0DeleteOptions": { "type": "object", "properties": { "database": { @@ -79,10 +79,10 @@ } } }, - "v1DeleteResponse": { + "v0DeleteResponse": { "type": "object" }, - "v1Field": { + "v0Field": { "type": "object", "properties": { "type": { @@ -95,7 +95,7 @@ } } }, - "v1ListOptions": { + "v0ListOptions": { "type": "object", "properties": { "database": { @@ -120,7 +120,7 @@ } } }, - "v1ListResponse": { + "v0ListResponse": { "type": "object", "properties": { "keys": { @@ -131,7 +131,7 @@ } } }, - "v1ReadOptions": { + "v0ReadOptions": { "type": "object", "properties": { "database": { @@ -157,23 +157,23 @@ "where": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/v1Field" + "$ref": "#/definitions/v0Field" } } } }, - "v1ReadResponse": { + "v0ReadResponse": { "type": "object", "properties": { "records": { "type": "array", "items": { - "$ref": "#/definitions/v1Record" + "$ref": "#/definitions/v0Record" } } } }, - "v1Record": { + "v0Record": { "type": "object", "properties": { "key": { @@ -193,13 +193,13 @@ "metadata": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/v1Field" + "$ref": "#/definitions/v0Field" }, "title": "the associated metadata" } } }, - "v1TablesResponse": { + "v0TablesResponse": { "type": "object", "properties": { "tables": { @@ -210,7 +210,7 @@ } } }, - "v1WriteOptions": { + "v0WriteOptions": { "type": "object", "properties": { "database": { @@ -231,7 +231,7 @@ } } }, - "v1WriteResponse": { + "v0WriteResponse": { "type": "object" } }, diff --git a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.go similarity index 77% rename from protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go rename to protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.go index 14adf22d3a4..cb2dd1d8639 100644 --- a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.go +++ b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.go @@ -2,13 +2,13 @@ // versions: // protoc-gen-go v1.27.1 // protoc v3.17.3 -// source: ocis/services/thumbnails/v1/thumbnails.proto +// source: ocis/services/thumbnails/v0/thumbnails.proto -package v1 +package v0 import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" + v0 "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v0" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -53,11 +53,11 @@ func (x GetThumbnailRequest_ThumbnailType) String() string { } func (GetThumbnailRequest_ThumbnailType) Descriptor() protoreflect.EnumDescriptor { - return file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes[0].Descriptor() + return file_ocis_services_thumbnails_v0_thumbnails_proto_enumTypes[0].Descriptor() } func (GetThumbnailRequest_ThumbnailType) Type() protoreflect.EnumType { - return &file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes[0] + return &file_ocis_services_thumbnails_v0_thumbnails_proto_enumTypes[0] } func (x GetThumbnailRequest_ThumbnailType) Number() protoreflect.EnumNumber { @@ -66,7 +66,7 @@ func (x GetThumbnailRequest_ThumbnailType) Number() protoreflect.EnumNumber { // Deprecated: Use GetThumbnailRequest_ThumbnailType.Descriptor instead. func (GetThumbnailRequest_ThumbnailType) EnumDescriptor() ([]byte, []int) { - return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0, 0} + return file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescGZIP(), []int{0, 0} } // A request to retrieve a thumbnail @@ -78,7 +78,7 @@ type GetThumbnailRequest struct { // The path to the source image Filepath string `protobuf:"bytes,1,opt,name=filepath,proto3" json:"filepath,omitempty"` // The type to which the thumbnail should get encoded to. - ThumbnailType GetThumbnailRequest_ThumbnailType `protobuf:"varint,2,opt,name=thumbnail_type,json=thumbnailType,proto3,enum=ocis.services.thumbnails.v1.GetThumbnailRequest_ThumbnailType" json:"thumbnail_type,omitempty"` + ThumbnailType GetThumbnailRequest_ThumbnailType `protobuf:"varint,2,opt,name=thumbnail_type,json=thumbnailType,proto3,enum=ocis.services.thumbnails.v0.GetThumbnailRequest_ThumbnailType" json:"thumbnail_type,omitempty"` // The width of the thumbnail Width int32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` // The height of the thumbnail @@ -92,7 +92,7 @@ type GetThumbnailRequest struct { func (x *GetThumbnailRequest) Reset() { *x = GetThumbnailRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0] + mi := &file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -105,7 +105,7 @@ func (x *GetThumbnailRequest) String() string { func (*GetThumbnailRequest) ProtoMessage() {} func (x *GetThumbnailRequest) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0] + mi := &file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -118,7 +118,7 @@ func (x *GetThumbnailRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetThumbnailRequest.ProtoReflect.Descriptor instead. func (*GetThumbnailRequest) Descriptor() ([]byte, []int) { - return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{0} + return file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescGZIP(), []int{0} } func (x *GetThumbnailRequest) GetFilepath() string { @@ -156,14 +156,14 @@ func (m *GetThumbnailRequest) GetSource() isGetThumbnailRequest_Source { return nil } -func (x *GetThumbnailRequest) GetWebdavSource() *v1.WebdavSource { +func (x *GetThumbnailRequest) GetWebdavSource() *v0.WebdavSource { if x, ok := x.GetSource().(*GetThumbnailRequest_WebdavSource); ok { return x.WebdavSource } return nil } -func (x *GetThumbnailRequest) GetCs3Source() *v1.CS3Source { +func (x *GetThumbnailRequest) GetCs3Source() *v0.CS3Source { if x, ok := x.GetSource().(*GetThumbnailRequest_Cs3Source); ok { return x.Cs3Source } @@ -175,11 +175,11 @@ type isGetThumbnailRequest_Source interface { } type GetThumbnailRequest_WebdavSource struct { - WebdavSource *v1.WebdavSource `protobuf:"bytes,5,opt,name=webdav_source,json=webdavSource,proto3,oneof"` + WebdavSource *v0.WebdavSource `protobuf:"bytes,5,opt,name=webdav_source,json=webdavSource,proto3,oneof"` } type GetThumbnailRequest_Cs3Source struct { - Cs3Source *v1.CS3Source `protobuf:"bytes,6,opt,name=cs3_source,json=cs3Source,proto3,oneof"` + Cs3Source *v0.CS3Source `protobuf:"bytes,6,opt,name=cs3_source,json=cs3Source,proto3,oneof"` } func (*GetThumbnailRequest_WebdavSource) isGetThumbnailRequest_Source() {} @@ -201,7 +201,7 @@ type GetThumbnailResponse struct { func (x *GetThumbnailResponse) Reset() { *x = GetThumbnailResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[1] + mi := &file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -214,7 +214,7 @@ func (x *GetThumbnailResponse) String() string { func (*GetThumbnailResponse) ProtoMessage() {} func (x *GetThumbnailResponse) ProtoReflect() protoreflect.Message { - mi := &file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[1] + mi := &file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -227,7 +227,7 @@ func (x *GetThumbnailResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetThumbnailResponse.ProtoReflect.Descriptor instead. func (*GetThumbnailResponse) Descriptor() ([]byte, []int) { - return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP(), []int{1} + return file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescGZIP(), []int{1} } func (x *GetThumbnailResponse) GetThumbnail() []byte { @@ -244,16 +244,16 @@ func (x *GetThumbnailResponse) GetMimetype() string { return "" } -var File_ocis_services_thumbnails_v1_thumbnails_proto protoreflect.FileDescriptor +var File_ocis_services_thumbnails_v0_thumbnails_proto protoreflect.FileDescriptor -var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ +var file_ocis_services_thumbnails_v0_thumbnails_proto_rawDesc = []byte{ 0x0a, 0x2c, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, + 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, - 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x2c, 0x6f, 0x63, 0x69, + 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x2c, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, - 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, + 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x30, 0x2f, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, @@ -264,7 +264,7 @@ var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ 0x0e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, + 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x03, 0x20, @@ -273,12 +273,12 @@ var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ 0x68, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, - 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, + 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x57, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x64, 0x61, 0x76, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x63, 0x73, 0x33, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, - 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x53, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x63, 0x73, 0x33, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x0d, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4a, 0x50, 0x47, 0x10, 0x01, @@ -291,16 +291,16 @@ var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ 0x10, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x12, 0x30, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, + 0x30, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xeb, 0x02, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, - 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x92, 0x41, 0xa4, 0x02, + 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x2f, 0x76, 0x30, 0x92, 0x41, 0xa4, 0x02, 0x12, 0xb8, 0x01, 0x0a, 0x22, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x75, 0x6d, 0x62, 0x6e, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, @@ -323,32 +323,32 @@ var file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = []byte{ } var ( - file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescOnce sync.Once - file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData = file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc + file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescOnce sync.Once + file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescData = file_ocis_services_thumbnails_v0_thumbnails_proto_rawDesc ) -func file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescGZIP() []byte { - file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescOnce.Do(func() { - file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData) +func file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescGZIP() []byte { + file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescOnce.Do(func() { + file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescData = protoimpl.X.CompressGZIP(file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescData) }) - return file_ocis_services_thumbnails_v1_thumbnails_proto_rawDescData -} - -var file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes = []interface{}{ - (GetThumbnailRequest_ThumbnailType)(0), // 0: ocis.services.thumbnails.v1.GetThumbnailRequest.ThumbnailType - (*GetThumbnailRequest)(nil), // 1: ocis.services.thumbnails.v1.GetThumbnailRequest - (*GetThumbnailResponse)(nil), // 2: ocis.services.thumbnails.v1.GetThumbnailResponse - (*v1.WebdavSource)(nil), // 3: ocis.messages.thumbnails.v1.WebdavSource - (*v1.CS3Source)(nil), // 4: ocis.messages.thumbnails.v1.CS3Source -} -var file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs = []int32{ - 0, // 0: ocis.services.thumbnails.v1.GetThumbnailRequest.thumbnail_type:type_name -> ocis.services.thumbnails.v1.GetThumbnailRequest.ThumbnailType - 3, // 1: ocis.services.thumbnails.v1.GetThumbnailRequest.webdav_source:type_name -> ocis.messages.thumbnails.v1.WebdavSource - 4, // 2: ocis.services.thumbnails.v1.GetThumbnailRequest.cs3_source:type_name -> ocis.messages.thumbnails.v1.CS3Source - 1, // 3: ocis.services.thumbnails.v1.ThumbnailService.GetThumbnail:input_type -> ocis.services.thumbnails.v1.GetThumbnailRequest - 2, // 4: ocis.services.thumbnails.v1.ThumbnailService.GetThumbnail:output_type -> ocis.services.thumbnails.v1.GetThumbnailResponse + return file_ocis_services_thumbnails_v0_thumbnails_proto_rawDescData +} + +var file_ocis_services_thumbnails_v0_thumbnails_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_ocis_services_thumbnails_v0_thumbnails_proto_goTypes = []interface{}{ + (GetThumbnailRequest_ThumbnailType)(0), // 0: ocis.services.thumbnails.v0.GetThumbnailRequest.ThumbnailType + (*GetThumbnailRequest)(nil), // 1: ocis.services.thumbnails.v0.GetThumbnailRequest + (*GetThumbnailResponse)(nil), // 2: ocis.services.thumbnails.v0.GetThumbnailResponse + (*v0.WebdavSource)(nil), // 3: ocis.messages.thumbnails.v0.WebdavSource + (*v0.CS3Source)(nil), // 4: ocis.messages.thumbnails.v0.CS3Source +} +var file_ocis_services_thumbnails_v0_thumbnails_proto_depIdxs = []int32{ + 0, // 0: ocis.services.thumbnails.v0.GetThumbnailRequest.thumbnail_type:type_name -> ocis.services.thumbnails.v0.GetThumbnailRequest.ThumbnailType + 3, // 1: ocis.services.thumbnails.v0.GetThumbnailRequest.webdav_source:type_name -> ocis.messages.thumbnails.v0.WebdavSource + 4, // 2: ocis.services.thumbnails.v0.GetThumbnailRequest.cs3_source:type_name -> ocis.messages.thumbnails.v0.CS3Source + 1, // 3: ocis.services.thumbnails.v0.ThumbnailService.GetThumbnail:input_type -> ocis.services.thumbnails.v0.GetThumbnailRequest + 2, // 4: ocis.services.thumbnails.v0.ThumbnailService.GetThumbnail:output_type -> ocis.services.thumbnails.v0.GetThumbnailResponse 4, // [4:5] is the sub-list for method output_type 3, // [3:4] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -356,13 +356,13 @@ var file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_ocis_services_thumbnails_v1_thumbnails_proto_init() } -func file_ocis_services_thumbnails_v1_thumbnails_proto_init() { - if File_ocis_services_thumbnails_v1_thumbnails_proto != nil { +func init() { file_ocis_services_thumbnails_v0_thumbnails_proto_init() } +func file_ocis_services_thumbnails_v0_thumbnails_proto_init() { + if File_ocis_services_thumbnails_v0_thumbnails_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetThumbnailRequest); i { case 0: return &v.state @@ -374,7 +374,7 @@ func file_ocis_services_thumbnails_v1_thumbnails_proto_init() { return nil } } - file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetThumbnailResponse); i { case 0: return &v.state @@ -387,7 +387,7 @@ func file_ocis_services_thumbnails_v1_thumbnails_proto_init() { } } } - file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes[0].OneofWrappers = []interface{}{ (*GetThumbnailRequest_WebdavSource)(nil), (*GetThumbnailRequest_Cs3Source)(nil), } @@ -395,19 +395,19 @@ func file_ocis_services_thumbnails_v1_thumbnails_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc, + RawDescriptor: file_ocis_services_thumbnails_v0_thumbnails_proto_rawDesc, NumEnums: 1, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes, - DependencyIndexes: file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs, - EnumInfos: file_ocis_services_thumbnails_v1_thumbnails_proto_enumTypes, - MessageInfos: file_ocis_services_thumbnails_v1_thumbnails_proto_msgTypes, + GoTypes: file_ocis_services_thumbnails_v0_thumbnails_proto_goTypes, + DependencyIndexes: file_ocis_services_thumbnails_v0_thumbnails_proto_depIdxs, + EnumInfos: file_ocis_services_thumbnails_v0_thumbnails_proto_enumTypes, + MessageInfos: file_ocis_services_thumbnails_v0_thumbnails_proto_msgTypes, }.Build() - File_ocis_services_thumbnails_v1_thumbnails_proto = out.File - file_ocis_services_thumbnails_v1_thumbnails_proto_rawDesc = nil - file_ocis_services_thumbnails_v1_thumbnails_proto_goTypes = nil - file_ocis_services_thumbnails_v1_thumbnails_proto_depIdxs = nil + File_ocis_services_thumbnails_v0_thumbnails_proto = out.File + file_ocis_services_thumbnails_v0_thumbnails_proto_rawDesc = nil + file_ocis_services_thumbnails_v0_thumbnails_proto_goTypes = nil + file_ocis_services_thumbnails_v0_thumbnails_proto_depIdxs = nil } diff --git a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.micro.go similarity index 97% rename from protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go rename to protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.micro.go index 281619319ec..701f1d58ce3 100644 --- a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.pb.micro.go +++ b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.micro.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-micro. DO NOT EDIT. -// source: ocis/services/thumbnails/v1/thumbnails.proto +// source: ocis/services/thumbnails/v0/thumbnails.proto -package v1 +package v0 import ( fmt "fmt" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" + _ "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v0" proto "google.golang.org/protobuf/proto" math "math" ) diff --git a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.swagger.json similarity index 97% rename from protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json rename to protogen/gen/ocis/services/thumbnails/v0/thumbnails.swagger.json index 982d589206b..f79a4f11908 100644 --- a/protogen/gen/ocis/services/thumbnails/v1/thumbnails.swagger.json +++ b/protogen/gen/ocis/services/thumbnails/v0/thumbnails.swagger.json @@ -66,7 +66,7 @@ } } }, - "v1CS3Source": { + "v0CS3Source": { "type": "object", "properties": { "path": { @@ -77,7 +77,7 @@ } } }, - "v1GetThumbnailResponse": { + "v0GetThumbnailResponse": { "type": "object", "properties": { "thumbnail": { @@ -92,7 +92,7 @@ }, "title": "The service response" }, - "v1WebdavSource": { + "v0WebdavSource": { "type": "object", "properties": { "url": { diff --git a/protogen/proto/buf.gen.yaml b/protogen/proto/buf.gen.yaml index 0ab33a71fef..ff14a89dd0a 100644 --- a/protogen/proto/buf.gen.yaml +++ b/protogen/proto/buf.gen.yaml @@ -18,10 +18,10 @@ plugins: opt: - paths=source_relative - "ignore_packages=\ - ocis.services.thumbnails.v1;\ - ocis.messages.thumbnails.v1;\ - ocis.services.store.v1;\ - ocis.messages.store.v1" + ocis.services.thumbnails.v0;\ + ocis.messages.thumbnails.v0;\ + ocis.services.store.v0;\ + ocis.messages.store.v0" - name: openapiv2 path: ../../.bingo/protoc-gen-openapiv2 diff --git a/protogen/proto/ocis/messages/accounts/v1/accounts.proto b/protogen/proto/ocis/messages/accounts/v0/accounts.proto similarity index 99% rename from protogen/proto/ocis/messages/accounts/v1/accounts.proto rename to protogen/proto/ocis/messages/accounts/v0/accounts.proto index ba4862ba1d1..e09deb2772e 100644 --- a/protogen/proto/ocis/messages/accounts/v1/accounts.proto +++ b/protogen/proto/ocis/messages/accounts/v0/accounts.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package ocis.messages.accounts.v1; +package ocis.messages.accounts.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0"; import "google/protobuf/timestamp.proto"; // Account follows the properties of the ms graph api user resource. diff --git a/protogen/proto/ocis/messages/settings/v1/settings.proto b/protogen/proto/ocis/messages/settings/v0/settings.proto similarity index 98% rename from protogen/proto/ocis/messages/settings/v1/settings.proto rename to protogen/proto/ocis/messages/settings/v0/settings.proto index 889b51cd3a2..aaf9f511b67 100644 --- a/protogen/proto/ocis/messages/settings/v1/settings.proto +++ b/protogen/proto/ocis/messages/settings/v0/settings.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package ocis.messages.settings.v1; +package ocis.messages.settings.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0"; // --- // messages for settings values diff --git a/protogen/proto/ocis/messages/store/v1/store.proto b/protogen/proto/ocis/messages/store/v0/store.proto similarity index 94% rename from protogen/proto/ocis/messages/store/v1/store.proto rename to protogen/proto/ocis/messages/store/v0/store.proto index c4307928904..d7991d56398 100644 --- a/protogen/proto/ocis/messages/store/v1/store.proto +++ b/protogen/proto/ocis/messages/store/v0/store.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package ocis.messages.store.v1; +package ocis.messages.store.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0"; message Field { // type of value e.g string, int, int64, bool, float64 diff --git a/protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto b/protogen/proto/ocis/messages/thumbnails/v0/thumbnails.proto similarity index 87% rename from protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto rename to protogen/proto/ocis/messages/thumbnails/v0/thumbnails.proto index 1a3afa174e8..3964970ef87 100644 --- a/protogen/proto/ocis/messages/thumbnails/v1/thumbnails.proto +++ b/protogen/proto/ocis/messages/thumbnails/v0/thumbnails.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package ocis.messages.thumbnails.v1; +package ocis.messages.thumbnails.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v0"; message WebdavSource { // REQUIRED. diff --git a/protogen/proto/ocis/services/accounts/v1/accounts.proto b/protogen/proto/ocis/services/accounts/v0/accounts.proto similarity index 95% rename from protogen/proto/ocis/services/accounts/v1/accounts.proto rename to protogen/proto/ocis/services/accounts/v0/accounts.proto index 21e15b4ff13..fc07dd6bbbc 100644 --- a/protogen/proto/ocis/services/accounts/v1/accounts.proto +++ b/protogen/proto/ocis/services/accounts/v0/accounts.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package ocis.services.accounts.v1; +package ocis.services.accounts.v0; -option go_package = "github.com/jvillafanez/prototest001/gen/ocis/services/accounts/v1"; +option go_package = "github.com/jvillafanez/prototest001/gen/ocis/services/accounts/v0"; -import "ocis/messages/accounts/v1/accounts.proto"; +import "ocis/messages/accounts/v0/accounts.proto"; import "google/api/field_behavior.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; @@ -48,14 +48,14 @@ service AccountsService { }; } // Gets an account - rpc GetAccount(GetAccountRequest) returns (ocis.messages.accounts.v1.Account) { + rpc GetAccount(GetAccountRequest) returns (ocis.messages.accounts.v0.Account) { option (google.api.http) = { post: "/api/v0/accounts/accounts-get", body: "*" }; } // Creates an account - rpc CreateAccount(CreateAccountRequest) returns (ocis.messages.accounts.v1.Account) { + rpc CreateAccount(CreateAccountRequest) returns (ocis.messages.accounts.v0.Account) { // Create maps to HTTP POST. URL path as the collection name. // HTTP request body contains the resource option (google.api.http) = { @@ -64,7 +64,7 @@ service AccountsService { }; } // Updates an account - rpc UpdateAccount(UpdateAccountRequest) returns (ocis.messages.accounts.v1.Account) { + rpc UpdateAccount(UpdateAccountRequest) returns (ocis.messages.accounts.v0.Account) { // Update maps to HTTP PATCH. Resource name is mapped to a URL path. // Resource is contained in the HTTP request body option (google.api.http) = { @@ -93,14 +93,14 @@ service GroupsService { }; } // Gets an groups - rpc GetGroup(GetGroupRequest) returns (ocis.messages.accounts.v1.Group) { + rpc GetGroup(GetGroupRequest) returns (ocis.messages.accounts.v0.Group) { option (google.api.http) = { post: "/api/v0/accounts/groups-get", body: "*" }; } // Creates a group - rpc CreateGroup(CreateGroupRequest) returns (ocis.messages.accounts.v1.Group) { + rpc CreateGroup(CreateGroupRequest) returns (ocis.messages.accounts.v0.Group) { // Create maps to HTTP POST. URL path as the collection name. // HTTP request body contains the resource option (google.api.http) = { @@ -109,7 +109,7 @@ service GroupsService { }; } // Updates a group - rpc UpdateGroup(UpdateGroupRequest) returns (ocis.messages.accounts.v1.Group) { + rpc UpdateGroup(UpdateGroupRequest) returns (ocis.messages.accounts.v0.Group) { // Update maps to HTTP PATCH. Resource name is mapped to a URL path. // Resource is contained in the HTTP request body option (google.api.http) = { @@ -133,7 +133,7 @@ service GroupsService { // or the stack overflow question https://stackoverflow.com/questions/49362894/why-is-the-microsoft-graph-api-using-ref-in-the-uri // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - rpc AddMember(AddMemberRequest) returns (ocis.messages.accounts.v1.Group) { + rpc AddMember(AddMemberRequest) returns (ocis.messages.accounts.v0.Group) { // All request parameters go into body. option (google.api.http) = { post: "/api/v0/groups/{group_id=*}/members/$ref" @@ -141,7 +141,7 @@ service GroupsService { }; } // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - rpc RemoveMember(RemoveMemberRequest) returns (ocis.messages.accounts.v1.Group) { + rpc RemoveMember(RemoveMemberRequest) returns (ocis.messages.accounts.v0.Group) { // All request parameters go into body. option (google.api.http) = { // URLs are broken @@ -217,7 +217,7 @@ message ListAccountsResponse { // The field name should match the noun "accounts" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - repeated ocis.messages.accounts.v1.Account accounts = 1; + repeated ocis.messages.accounts.v0.Account accounts = 1; // Token to retrieve the next page of results, or empty if there are no // more results in the list @@ -230,12 +230,12 @@ message GetAccountRequest { message CreateAccountRequest { // The account resource to create - ocis.messages.accounts.v1.Account account = 1; + ocis.messages.accounts.v0.Account account = 1; } message UpdateAccountRequest { // The account resource which replaces the resource on the server - ocis.messages.accounts.v1.Account account = 1; + ocis.messages.accounts.v0.Account account = 1; // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask @@ -283,7 +283,7 @@ message ListGroupsResponse { // The field name should match the noun "group" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - repeated ocis.messages.accounts.v1.Group groups = 1; + repeated ocis.messages.accounts.v0.Group groups = 1; // Token to retrieve the next page of results, or empty if there are no // more results in the list @@ -296,12 +296,12 @@ message GetGroupRequest { message CreateGroupRequest { // The account resource to create - ocis.messages.accounts.v1.Group group = 1; + ocis.messages.accounts.v0.Group group = 1; } message UpdateGroupRequest { // The group resource which replaces the resource on the server - ocis.messages.accounts.v1.Group group = 1; + ocis.messages.accounts.v0.Group group = 1; // The update mask applies to the resource. For the `FieldMask` definition, // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask @@ -365,7 +365,7 @@ message ListMembersResponse { // The field name should match the noun "members" in the method name. There // will be a maximum number of items returned based on the page_size field // in the request - repeated ocis.messages.accounts.v1.Account members = 1; + repeated ocis.messages.accounts.v0.Account members = 1; // Token to retrieve the next page of results, or empty if there are no // more results in the list diff --git a/protogen/proto/ocis/services/settings/v1/settings.proto b/protogen/proto/ocis/services/settings/v0/settings.proto similarity index 85% rename from protogen/proto/ocis/services/settings/v1/settings.proto rename to protogen/proto/ocis/services/settings/v0/settings.proto index 2fb61a33ca7..7aa342a1eb0 100644 --- a/protogen/proto/ocis/services/settings/v1/settings.proto +++ b/protogen/proto/ocis/services/settings/v0/settings.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package ocis.services.settings.v1; +package ocis.services.settings.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0"; -import "ocis/messages/settings/v1/settings.proto"; +import "ocis/messages/settings/v0/settings.proto"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; @@ -139,11 +139,11 @@ service PermissionService { // requests and responses for settings bundles // --- message SaveBundleRequest { - ocis.messages.settings.v1.Bundle bundle = 1; + ocis.messages.settings.v0.Bundle bundle = 1; } message SaveBundleResponse { - ocis.messages.settings.v1.Bundle bundle = 1; + ocis.messages.settings.v0.Bundle bundle = 1; } message GetBundleRequest { @@ -151,7 +151,7 @@ message GetBundleRequest { } message GetBundleResponse { - ocis.messages.settings.v1.Bundle bundle = 1; + ocis.messages.settings.v0.Bundle bundle = 1; } message ListBundlesRequest { @@ -159,16 +159,16 @@ message ListBundlesRequest { } message ListBundlesResponse { - repeated ocis.messages.settings.v1.Bundle bundles = 1; + repeated ocis.messages.settings.v0.Bundle bundles = 1; } message AddSettingToBundleRequest { string bundle_id = 1; - ocis.messages.settings.v1.Setting setting = 2; + ocis.messages.settings.v0.Setting setting = 2; } message AddSettingToBundleResponse { - ocis.messages.settings.v1.Setting setting = 1; + ocis.messages.settings.v0.Setting setting = 1; } message RemoveSettingFromBundleRequest { @@ -181,11 +181,11 @@ message RemoveSettingFromBundleRequest { // --- message SaveValueRequest { - ocis.messages.settings.v1.Value value = 1; + ocis.messages.settings.v0.Value value = 1; } message SaveValueResponse { - ocis.messages.settings.v1.ValueWithIdentifier value = 1; + ocis.messages.settings.v0.ValueWithIdentifier value = 1; } message GetValueRequest { @@ -193,7 +193,7 @@ message GetValueRequest { } message GetValueResponse { - ocis.messages.settings.v1.ValueWithIdentifier value = 1; + ocis.messages.settings.v0.ValueWithIdentifier value = 1; } message ListValuesRequest { @@ -202,7 +202,7 @@ message ListValuesRequest { } message ListValuesResponse { - repeated ocis.messages.settings.v1.ValueWithIdentifier values = 1; + repeated ocis.messages.settings.v0.ValueWithIdentifier values = 1; } message GetValueByUniqueIdentifiersRequest{ @@ -219,7 +219,7 @@ message ListRoleAssignmentsRequest { } message ListRoleAssignmentsResponse { - repeated ocis.messages.settings.v1.UserRoleAssignment assignments = 1; + repeated ocis.messages.settings.v0.UserRoleAssignment assignments = 1; } message AssignRoleToUserRequest { @@ -229,7 +229,7 @@ message AssignRoleToUserRequest { } message AssignRoleToUserResponse { - ocis.messages.settings.v1.UserRoleAssignment assignment = 1; + ocis.messages.settings.v0.UserRoleAssignment assignment = 1; } message RemoveRoleFromUserRequest { @@ -241,11 +241,11 @@ message RemoveRoleFromUserRequest { // --- message ListPermissionsByResourceRequest { - ocis.messages.settings.v1.Resource resource = 1; + ocis.messages.settings.v0.Resource resource = 1; } message ListPermissionsByResourceResponse { - repeated ocis.messages.settings.v1.Permission permissions = 1; + repeated ocis.messages.settings.v0.Permission permissions = 1; } message GetPermissionByIDRequest { @@ -253,5 +253,5 @@ message GetPermissionByIDRequest { } message GetPermissionByIDResponse { - ocis.messages.settings.v1.Permission permission = 1; + ocis.messages.settings.v0.Permission permission = 1; } diff --git a/protogen/proto/ocis/services/store/v1/store.proto b/protogen/proto/ocis/services/store/v0/store.proto similarity index 80% rename from protogen/proto/ocis/services/store/v1/store.proto rename to protogen/proto/ocis/services/store/v0/store.proto index 0d8d54e7213..01f9d1839c8 100644 --- a/protogen/proto/ocis/services/store/v1/store.proto +++ b/protogen/proto/ocis/services/store/v0/store.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package ocis.services.store.v1; +package ocis.services.store.v0; + +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/service/store/v0"; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/service/store/v1"; - -import "ocis/messages/store/v1/store.proto"; +import "ocis/messages/store/v0/store.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { @@ -42,29 +42,29 @@ service Store { message ReadRequest { string key = 1; - ocis.messages.store.v1.ReadOptions options = 2; + ocis.messages.store.v0.ReadOptions options = 2; } message ReadResponse { - repeated ocis.messages.store.v1.Record records = 1; + repeated ocis.messages.store.v0.Record records = 1; } message WriteRequest { - ocis.messages.store.v1.Record record = 1; - ocis.messages.store.v1.WriteOptions options = 2; + ocis.messages.store.v0.Record record = 1; + ocis.messages.store.v0.WriteOptions options = 2; } message WriteResponse {} message DeleteRequest { string key = 1; - ocis.messages.store.v1.DeleteOptions options = 2; + ocis.messages.store.v0.DeleteOptions options = 2; } message DeleteResponse {} message ListRequest { - ocis.messages.store.v1.ListOptions options = 1; + ocis.messages.store.v0.ListOptions options = 1; } message ListResponse { diff --git a/protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto b/protogen/proto/ocis/services/thumbnails/v0/thumbnails.proto similarity index 87% rename from protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto rename to protogen/proto/ocis/services/thumbnails/v0/thumbnails.proto index 3facf001d43..0b7eae51715 100644 --- a/protogen/proto/ocis/services/thumbnails/v1/thumbnails.proto +++ b/protogen/proto/ocis/services/thumbnails/v0/thumbnails.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package ocis.services.thumbnails.v1; +package ocis.services.thumbnails.v0; -option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1"; +option go_package = "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0"; -import "ocis/messages/thumbnails/v1/thumbnails.proto"; +import "ocis/messages/thumbnails/v0/thumbnails.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { @@ -53,8 +53,8 @@ message GetThumbnailRequest { // The height of the thumbnail int32 height = 4; oneof source { - ocis.messages.thumbnails.v1.WebdavSource webdav_source = 5; - ocis.messages.thumbnails.v1.CS3Source cs3_source = 6; + ocis.messages.thumbnails.v0.WebdavSource webdav_source = 5; + ocis.messages.thumbnails.v0.CS3Source cs3_source = 6; } } diff --git a/proxy/pkg/command/server.go b/proxy/pkg/command/server.go index 787e39834b2..90d8a1de1af 100644 --- a/proxy/pkg/command/server.go +++ b/proxy/pkg/command/server.go @@ -7,9 +7,9 @@ import ( "net/http" "time" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" "github.com/coreos/go-oidc/v3/oidc" "github.com/cs3org/reva/pkg/token/manager/jwt" @@ -20,7 +20,7 @@ import ( pkgmiddleware "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "github.com/owncloud/ocis/proxy/pkg/config" "github.com/owncloud/ocis/proxy/pkg/config/parser" "github.com/owncloud/ocis/proxy/pkg/cs3" diff --git a/proxy/pkg/middleware/options.go b/proxy/pkg/middleware/options.go index 8486f5a4a7f..f45c428d768 100644 --- a/proxy/pkg/middleware/options.go +++ b/proxy/pkg/middleware/options.go @@ -6,9 +6,9 @@ import ( "github.com/owncloud/ocis/proxy/pkg/user/backend" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" "github.com/owncloud/ocis/ocis-pkg/log" diff --git a/proxy/pkg/middleware/signed_url_auth.go b/proxy/pkg/middleware/signed_url_auth.go index 5abc9df021b..ee33a790f8c 100644 --- a/proxy/pkg/middleware/signed_url_auth.go +++ b/proxy/pkg/middleware/signed_url_auth.go @@ -13,8 +13,8 @@ import ( revactx "github.com/cs3org/reva/pkg/ctx" "github.com/owncloud/ocis/ocis-pkg/log" - storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" "github.com/owncloud/ocis/proxy/pkg/config" "github.com/owncloud/ocis/proxy/pkg/user/backend" "golang.org/x/crypto/pbkdf2" diff --git a/proxy/pkg/proxy/policy/selector.go b/proxy/pkg/proxy/policy/selector.go index 963f5df0015..a3d1224fd46 100644 --- a/proxy/pkg/proxy/policy/selector.go +++ b/proxy/pkg/proxy/policy/selector.go @@ -6,7 +6,7 @@ import ( "regexp" "sort" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/asim/go-micro/plugins/client/grpc/v4" revactx "github.com/cs3org/reva/pkg/ctx" diff --git a/proxy/pkg/proxy/policy/selector_test.go b/proxy/pkg/proxy/policy/selector_test.go index c8a96557818..28eb1a07b31 100644 --- a/proxy/pkg/proxy/policy/selector_test.go +++ b/proxy/pkg/proxy/policy/selector_test.go @@ -10,8 +10,8 @@ import ( userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" revactx "github.com/cs3org/reva/pkg/ctx" "github.com/owncloud/ocis/ocis-pkg/oidc" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" "github.com/owncloud/ocis/proxy/pkg/config" "go-micro.dev/v4/client" ) diff --git a/proxy/pkg/user/backend/accounts.go b/proxy/pkg/user/backend/accounts.go index f5d19fc56be..1c33c61b1f0 100644 --- a/proxy/pkg/user/backend/accounts.go +++ b/proxy/pkg/user/backend/accounts.go @@ -6,8 +6,8 @@ import ( "net/http" "strings" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" @@ -15,7 +15,7 @@ import ( "github.com/cs3org/reva/pkg/token" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) // NewAccountsServiceUserBackend creates a user-provider which fetches users from the ocis accounts-service diff --git a/proxy/pkg/user/backend/accounts_test.go b/proxy/pkg/user/backend/accounts_test.go index 4e1f2a35612..3115d25076c 100644 --- a/proxy/pkg/user/backend/accounts_test.go +++ b/proxy/pkg/user/backend/accounts_test.go @@ -8,10 +8,10 @@ import ( "github.com/cs3org/reva/pkg/token/manager/jwt" "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/oidc" - accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v1" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + accountsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/accounts/v0" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "go-micro.dev/v4/client" diff --git a/proxy/pkg/user/backend/backend.go b/proxy/pkg/user/backend/backend.go index cc6cf835303..9cfb51d614f 100644 --- a/proxy/pkg/user/backend/backend.go +++ b/proxy/pkg/user/backend/backend.go @@ -8,7 +8,7 @@ import ( gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "google.golang.org/grpc" ) diff --git a/proxy/pkg/user/backend/cs3.go b/proxy/pkg/user/backend/cs3.go index 43f532a9de4..e754760b99f 100644 --- a/proxy/pkg/user/backend/cs3.go +++ b/proxy/pkg/user/backend/cs3.go @@ -9,7 +9,7 @@ import ( rpcv1beta1 "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1" types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1" "github.com/owncloud/ocis/ocis-pkg/log" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" settingsService "github.com/owncloud/ocis/settings/pkg/service/v0" ) diff --git a/settings/pkg/server/grpc/server.go b/settings/pkg/server/grpc/server.go index 409f440296d..ee9e3720dcc 100644 --- a/settings/pkg/server/grpc/server.go +++ b/settings/pkg/server/grpc/server.go @@ -6,7 +6,7 @@ import ( permissions "github.com/cs3org/go-cs3apis/cs3/permissions/v1beta1" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" svc "github.com/owncloud/ocis/settings/pkg/service/v0" "go-micro.dev/v4/api" "go-micro.dev/v4/server" diff --git a/settings/pkg/server/http/server.go b/settings/pkg/server/http/server.go index 1f693334b83..173a9fc7a61 100644 --- a/settings/pkg/server/http/server.go +++ b/settings/pkg/server/http/server.go @@ -8,7 +8,7 @@ import ( "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/service/http" "github.com/owncloud/ocis/ocis-pkg/version" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "github.com/owncloud/ocis/settings/pkg/assets" svc "github.com/owncloud/ocis/settings/pkg/service/v0" "go-micro.dev/v4" diff --git a/settings/pkg/service/v0/permissions.go b/settings/pkg/service/v0/permissions.go index 4ed01d30dc9..01645791383 100644 --- a/settings/pkg/service/v0/permissions.go +++ b/settings/pkg/service/v0/permissions.go @@ -1,7 +1,7 @@ package svc import ( - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" ) func (g Service) hasPermission( diff --git a/settings/pkg/service/v0/service.go b/settings/pkg/service/v0/service.go index 4590b2ce9af..b7d500acfad 100644 --- a/settings/pkg/service/v0/service.go +++ b/settings/pkg/service/v0/service.go @@ -11,8 +11,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/roles" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" "github.com/owncloud/ocis/settings/pkg/config" "github.com/owncloud/ocis/settings/pkg/settings" store "github.com/owncloud/ocis/settings/pkg/store/filesystem" diff --git a/settings/pkg/service/v0/settings.go b/settings/pkg/service/v0/settings.go index 902dcd9a3e6..454becfbac7 100644 --- a/settings/pkg/service/v0/settings.go +++ b/settings/pkg/service/v0/settings.go @@ -1,8 +1,8 @@ package svc import ( - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) const ( diff --git a/settings/pkg/service/v0/validator.go b/settings/pkg/service/v0/validator.go index 3f66e12d08d..1120af1b599 100644 --- a/settings/pkg/service/v0/validator.go +++ b/settings/pkg/service/v0/validator.go @@ -5,8 +5,8 @@ import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" - settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" + settingssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/settings/v0" ) var ( diff --git a/settings/pkg/settings/settings.go b/settings/pkg/settings/settings.go index 81ba4938deb..9132423e8f4 100644 --- a/settings/pkg/settings/settings.go +++ b/settings/pkg/settings/settings.go @@ -3,7 +3,7 @@ package settings import ( "errors" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/owncloud/ocis/settings/pkg/config" ) diff --git a/settings/pkg/store/filesystem/assignments.go b/settings/pkg/store/filesystem/assignments.go index 9ce9e0af32c..d34496a7aeb 100644 --- a/settings/pkg/store/filesystem/assignments.go +++ b/settings/pkg/store/filesystem/assignments.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/gofrs/uuid" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" ) // ListRoleAssignments loads and returns all role assignments matching the given assignment identifier. diff --git a/settings/pkg/store/filesystem/assignments_test.go b/settings/pkg/store/filesystem/assignments_test.go index 0051d7cc7f6..1edeb729601 100644 --- a/settings/pkg/store/filesystem/assignments_test.go +++ b/settings/pkg/store/filesystem/assignments_test.go @@ -8,7 +8,7 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/stretchr/testify/assert" ) diff --git a/settings/pkg/store/filesystem/bundles.go b/settings/pkg/store/filesystem/bundles.go index d1a63924f08..9ab850839c7 100644 --- a/settings/pkg/store/filesystem/bundles.go +++ b/settings/pkg/store/filesystem/bundles.go @@ -8,7 +8,7 @@ import ( "sync" "github.com/gofrs/uuid" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/owncloud/ocis/settings/pkg/store/errortypes" ) diff --git a/settings/pkg/store/filesystem/bundles_test.go b/settings/pkg/store/filesystem/bundles_test.go index 096a9b3ddf7..ddee0f94e6e 100644 --- a/settings/pkg/store/filesystem/bundles_test.go +++ b/settings/pkg/store/filesystem/bundles_test.go @@ -4,7 +4,7 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/stretchr/testify/assert" ) diff --git a/settings/pkg/store/filesystem/permissions.go b/settings/pkg/store/filesystem/permissions.go index 49f3c097a8d..eacd0f82818 100644 --- a/settings/pkg/store/filesystem/permissions.go +++ b/settings/pkg/store/filesystem/permissions.go @@ -1,7 +1,7 @@ package store import ( - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/owncloud/ocis/settings/pkg/settings" "github.com/owncloud/ocis/settings/pkg/util" ) diff --git a/settings/pkg/store/filesystem/values.go b/settings/pkg/store/filesystem/values.go index 89014f4d3d8..43245ed3dab 100644 --- a/settings/pkg/store/filesystem/values.go +++ b/settings/pkg/store/filesystem/values.go @@ -7,7 +7,7 @@ import ( "path/filepath" "github.com/gofrs/uuid" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" ) // ListValues reads all values that match the given bundleId and accountUUID. diff --git a/settings/pkg/store/filesystem/values_test.go b/settings/pkg/store/filesystem/values_test.go index 8464cb69013..f65a94574b3 100644 --- a/settings/pkg/store/filesystem/values_test.go +++ b/settings/pkg/store/filesystem/values_test.go @@ -4,7 +4,7 @@ import ( "testing" olog "github.com/owncloud/ocis/ocis-pkg/log" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "github.com/stretchr/testify/assert" ) diff --git a/settings/pkg/util/resource_helper.go b/settings/pkg/util/resource_helper.go index 0554e7f9e23..95818575c24 100644 --- a/settings/pkg/util/resource_helper.go +++ b/settings/pkg/util/resource_helper.go @@ -1,7 +1,7 @@ package util import ( - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" ) const ( diff --git a/settings/pkg/util/resource_helper_test.go b/settings/pkg/util/resource_helper_test.go index 8530bdb70cc..8f864a78e14 100644 --- a/settings/pkg/util/resource_helper_test.go +++ b/settings/pkg/util/resource_helper_test.go @@ -3,7 +3,7 @@ package util import ( "testing" - settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v1" + settingsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/settings/v0" "gotest.tools/v3/assert" ) diff --git a/store/pkg/server/grpc/server.go b/store/pkg/server/grpc/server.go index 2e3cdcdb2be..d17a40ea2de 100644 --- a/store/pkg/server/grpc/server.go +++ b/store/pkg/server/grpc/server.go @@ -3,7 +3,7 @@ package grpc import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" svc "github.com/owncloud/ocis/store/pkg/service/v0" ) diff --git a/store/pkg/service/v0/service.go b/store/pkg/service/v0/service.go index bed2728da70..2373d3b4a77 100644 --- a/store/pkg/service/v0/service.go +++ b/store/pkg/service/v0/service.go @@ -10,8 +10,8 @@ import ( "github.com/blevesearch/bleve/v2" "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword" "github.com/owncloud/ocis/ocis-pkg/log" - storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v1" - storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v1" + storemsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/store/v0" + storesvc "github.com/owncloud/ocis/protogen/gen/ocis/services/store/v0" "github.com/owncloud/ocis/store/pkg/config" merrors "go-micro.dev/v4/errors" "google.golang.org/protobuf/encoding/protojson" diff --git a/thumbnails/pkg/server/grpc/server.go b/thumbnails/pkg/server/grpc/server.go index 318c3dc4bc5..815154c7a7a 100644 --- a/thumbnails/pkg/server/grpc/server.go +++ b/thumbnails/pkg/server/grpc/server.go @@ -4,7 +4,7 @@ import ( "github.com/cs3org/reva/pkg/rgrpc/todo/pool" "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/owncloud/ocis/ocis-pkg/version" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" svc "github.com/owncloud/ocis/thumbnails/pkg/service/v0" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/imgsource" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/storage" diff --git a/thumbnails/pkg/service/v0/instrument.go b/thumbnails/pkg/service/v0/instrument.go index fb3b8341074..9423349d8ef 100644 --- a/thumbnails/pkg/service/v0/instrument.go +++ b/thumbnails/pkg/service/v0/instrument.go @@ -3,7 +3,7 @@ package svc import ( "context" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" "github.com/owncloud/ocis/thumbnails/pkg/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/thumbnails/pkg/service/v0/logging.go b/thumbnails/pkg/service/v0/logging.go index eb04c263fe8..c4e84535583 100644 --- a/thumbnails/pkg/service/v0/logging.go +++ b/thumbnails/pkg/service/v0/logging.go @@ -5,7 +5,7 @@ import ( "time" "github.com/owncloud/ocis/ocis-pkg/log" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" ) // NewLogging returns a service that logs messages. diff --git a/thumbnails/pkg/service/v0/service.go b/thumbnails/pkg/service/v0/service.go index 9e7de319236..5a99c6d7f61 100644 --- a/thumbnails/pkg/service/v0/service.go +++ b/thumbnails/pkg/service/v0/service.go @@ -12,7 +12,7 @@ import ( provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" revactx "github.com/cs3org/reva/pkg/ctx" "github.com/owncloud/ocis/ocis-pkg/log" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" "github.com/owncloud/ocis/thumbnails/pkg/preprocessor" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail" "github.com/owncloud/ocis/thumbnails/pkg/thumbnail/imgsource" diff --git a/thumbnails/pkg/service/v0/tracing.go b/thumbnails/pkg/service/v0/tracing.go index 25256aafb93..fcd8cc44914 100644 --- a/thumbnails/pkg/service/v0/tracing.go +++ b/thumbnails/pkg/service/v0/tracing.go @@ -5,7 +5,7 @@ import ( "go.opentelemetry.io/otel/trace" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" thumbnailsTracing "github.com/owncloud/ocis/thumbnails/pkg/tracing" "go.opentelemetry.io/otel/attribute" ) diff --git a/webdav/pkg/service/v0/service.go b/webdav/pkg/service/v0/service.go index e2477ad0c3c..2ab53bd486f 100644 --- a/webdav/pkg/service/v0/service.go +++ b/webdav/pkg/service/v0/service.go @@ -19,8 +19,8 @@ import ( "github.com/owncloud/ocis/ocis-pkg/service/grpc" "github.com/go-chi/chi/v5" - thumbnailsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v1" - thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v1" + thumbnailsmsg "github.com/owncloud/ocis/protogen/gen/ocis/messages/thumbnails/v0" + thumbnailssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/thumbnails/v0" "github.com/owncloud/ocis/webdav/pkg/config" "github.com/owncloud/ocis/webdav/pkg/dav/requests" )