diff --git a/go/cloud/credentials/credentials.pb.go b/go/cloud/credentials/credentials.pb.go new file mode 100644 index 0000000..ce10c08 --- /dev/null +++ b/go/cloud/credentials/credentials.pb.go @@ -0,0 +1,417 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: zenoss/cloud/credentials.proto + +package credentials + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "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 Credential struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + Secrets map[string]string `protobuf:"bytes,3,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Credential) Reset() { + *x = Credential{} + if protoimpl.UnsafeEnabled { + mi := &file_zenoss_cloud_credentials_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Credential) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Credential) ProtoMessage() {} + +func (x *Credential) ProtoReflect() protoreflect.Message { + mi := &file_zenoss_cloud_credentials_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 Credential.ProtoReflect.Descriptor instead. +func (*Credential) Descriptor() ([]byte, []int) { + return file_zenoss_cloud_credentials_proto_rawDescGZIP(), []int{0} +} + +func (x *Credential) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Credential) GetInfo() *Info { + if x != nil { + return x.Info + } + return nil +} + +func (x *Credential) GetSecrets() map[string]string { + if x != nil { + return x.Secrets + } + return nil +} + +type Info struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *Info) Reset() { + *x = Info{} + if protoimpl.UnsafeEnabled { + mi := &file_zenoss_cloud_credentials_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_zenoss_cloud_credentials_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 Info.ProtoReflect.Descriptor instead. +func (*Info) Descriptor() ([]byte, []int) { + return file_zenoss_cloud_credentials_proto_rawDescGZIP(), []int{1} +} + +func (x *Info) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Info) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Info) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +type GetCredentialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetCredentialRequest) Reset() { + *x = GetCredentialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_zenoss_cloud_credentials_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCredentialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCredentialRequest) ProtoMessage() {} + +func (x *GetCredentialRequest) ProtoReflect() protoreflect.Message { + mi := &file_zenoss_cloud_credentials_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 GetCredentialRequest.ProtoReflect.Descriptor instead. +func (*GetCredentialRequest) Descriptor() ([]byte, []int) { + return file_zenoss_cloud_credentials_proto_rawDescGZIP(), []int{2} +} + +func (x *GetCredentialRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetCredentialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Credential *Credential `protobuf:"bytes,1,opt,name=credential,proto3" json:"credential,omitempty"` +} + +func (x *GetCredentialResponse) Reset() { + *x = GetCredentialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_zenoss_cloud_credentials_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCredentialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCredentialResponse) ProtoMessage() {} + +func (x *GetCredentialResponse) ProtoReflect() protoreflect.Message { + mi := &file_zenoss_cloud_credentials_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 GetCredentialResponse.ProtoReflect.Descriptor instead. +func (*GetCredentialResponse) Descriptor() ([]byte, []int) { + return file_zenoss_cloud_credentials_proto_rawDescGZIP(), []int{3} +} + +func (x *GetCredentialResponse) GetCredential() *Credential { + if x != nil { + return x.Credential + } + return nil +} + +var File_zenoss_cloud_credentials_proto protoreflect.FileDescriptor + +var file_zenoss_cloud_credentials_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x7a, 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x18, 0x7a, 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 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, 0x22, 0xd9, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x7a, 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x7a, 0x65, 0x6e, 0x6f, + 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2e, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x64, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0x26, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x5d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, + 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x32, 0xa7, + 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x2e, 0x2e, 0x7a, 0x65, 0x6e, 0x6f, + 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x7a, 0x65, 0x6e, 0x6f, + 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x59, 0x0a, 0x1c, 0x6f, 0x72, 0x67, 0x2e, + 0x7a, 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x7a, 0x65, 0x6e, 0x6f, 0x73, 0x73, 0x2f, 0x7a, 0x65, + 0x6e, 0x6f, 0x73, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x67, + 0x6f, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_zenoss_cloud_credentials_proto_rawDescOnce sync.Once + file_zenoss_cloud_credentials_proto_rawDescData = file_zenoss_cloud_credentials_proto_rawDesc +) + +func file_zenoss_cloud_credentials_proto_rawDescGZIP() []byte { + file_zenoss_cloud_credentials_proto_rawDescOnce.Do(func() { + file_zenoss_cloud_credentials_proto_rawDescData = protoimpl.X.CompressGZIP(file_zenoss_cloud_credentials_proto_rawDescData) + }) + return file_zenoss_cloud_credentials_proto_rawDescData +} + +var file_zenoss_cloud_credentials_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_zenoss_cloud_credentials_proto_goTypes = []interface{}{ + (*Credential)(nil), // 0: zenoss.cloud.credentials.Credential + (*Info)(nil), // 1: zenoss.cloud.credentials.Info + (*GetCredentialRequest)(nil), // 2: zenoss.cloud.credentials.GetCredentialRequest + (*GetCredentialResponse)(nil), // 3: zenoss.cloud.credentials.GetCredentialResponse + nil, // 4: zenoss.cloud.credentials.Credential.SecretsEntry +} +var file_zenoss_cloud_credentials_proto_depIdxs = []int32{ + 1, // 0: zenoss.cloud.credentials.Credential.info:type_name -> zenoss.cloud.credentials.Info + 4, // 1: zenoss.cloud.credentials.Credential.secrets:type_name -> zenoss.cloud.credentials.Credential.SecretsEntry + 0, // 2: zenoss.cloud.credentials.GetCredentialResponse.credential:type_name -> zenoss.cloud.credentials.Credential + 2, // 3: zenoss.cloud.credentials.CredentialManagement.GetCredential:input_type -> zenoss.cloud.credentials.GetCredentialRequest + 3, // 4: zenoss.cloud.credentials.CredentialManagement.GetCredential:output_type -> zenoss.cloud.credentials.GetCredentialResponse + 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_zenoss_cloud_credentials_proto_init() } +func file_zenoss_cloud_credentials_proto_init() { + if File_zenoss_cloud_credentials_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_zenoss_cloud_credentials_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Credential); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_zenoss_cloud_credentials_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_zenoss_cloud_credentials_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCredentialRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_zenoss_cloud_credentials_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCredentialResponse); 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_zenoss_cloud_credentials_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_zenoss_cloud_credentials_proto_goTypes, + DependencyIndexes: file_zenoss_cloud_credentials_proto_depIdxs, + MessageInfos: file_zenoss_cloud_credentials_proto_msgTypes, + }.Build() + File_zenoss_cloud_credentials_proto = out.File + file_zenoss_cloud_credentials_proto_rawDesc = nil + file_zenoss_cloud_credentials_proto_goTypes = nil + file_zenoss_cloud_credentials_proto_depIdxs = nil +} diff --git a/go/cloud/credentials/credentials.pb.gw.go b/go/cloud/credentials/credentials.pb.gw.go new file mode 100644 index 0000000..e50611b --- /dev/null +++ b/go/cloud/credentials/credentials.pb.gw.go @@ -0,0 +1,189 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: zenoss/cloud/credentials.proto + +/* +Package credentials is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package credentials + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_CredentialManagement_GetCredential_0(ctx context.Context, marshaler runtime.Marshaler, client CredentialManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCredentialRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CredentialManagement_GetCredential_0(ctx context.Context, marshaler runtime.Marshaler, server CredentialManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCredentialRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetCredential(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCredentialManagementHandlerServer registers the http handlers for service CredentialManagement to "mux". +// UnaryRPC :call CredentialManagementServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCredentialManagementHandlerFromEndpoint instead. +func RegisterCredentialManagementHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CredentialManagementServer) error { + + mux.Handle("GET", pattern_CredentialManagement_GetCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/zenoss.cloud.credentials.CredentialManagement/GetCredential", runtime.WithHTTPPathPattern("/v1/credentials/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CredentialManagement_GetCredential_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CredentialManagement_GetCredential_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCredentialManagementHandlerFromEndpoint is same as RegisterCredentialManagementHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCredentialManagementHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCredentialManagementHandler(ctx, mux, conn) +} + +// RegisterCredentialManagementHandler registers the http handlers for service CredentialManagement to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCredentialManagementHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCredentialManagementHandlerClient(ctx, mux, NewCredentialManagementClient(conn)) +} + +// RegisterCredentialManagementHandlerClient registers the http handlers for service CredentialManagement +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CredentialManagementClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CredentialManagementClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CredentialManagementClient" to call the correct interceptors. +func RegisterCredentialManagementHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CredentialManagementClient) error { + + mux.Handle("GET", pattern_CredentialManagement_GetCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/zenoss.cloud.credentials.CredentialManagement/GetCredential", runtime.WithHTTPPathPattern("/v1/credentials/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CredentialManagement_GetCredential_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CredentialManagement_GetCredential_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CredentialManagement_GetCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "credentials", "id"}, "")) +) + +var ( + forward_CredentialManagement_GetCredential_0 = runtime.ForwardResponseMessage +) diff --git a/go/cloud/credentials/credentials_grpc.pb.go b/go/cloud/credentials/credentials_grpc.pb.go new file mode 100644 index 0000000..f0765c3 --- /dev/null +++ b/go/cloud/credentials/credentials_grpc.pb.go @@ -0,0 +1,105 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: zenoss/cloud/credentials.proto + +package credentials + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// CredentialManagementClient is the client API for CredentialManagement service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CredentialManagementClient interface { + GetCredential(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption) (*GetCredentialResponse, error) +} + +type credentialManagementClient struct { + cc grpc.ClientConnInterface +} + +func NewCredentialManagementClient(cc grpc.ClientConnInterface) CredentialManagementClient { + return &credentialManagementClient{cc} +} + +func (c *credentialManagementClient) GetCredential(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption) (*GetCredentialResponse, error) { + out := new(GetCredentialResponse) + err := c.cc.Invoke(ctx, "/zenoss.cloud.credentials.CredentialManagement/GetCredential", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CredentialManagementServer is the server API for CredentialManagement service. +// All implementations must embed UnimplementedCredentialManagementServer +// for forward compatibility +type CredentialManagementServer interface { + GetCredential(context.Context, *GetCredentialRequest) (*GetCredentialResponse, error) + mustEmbedUnimplementedCredentialManagementServer() +} + +// UnimplementedCredentialManagementServer must be embedded to have forward compatible implementations. +type UnimplementedCredentialManagementServer struct { +} + +func (UnimplementedCredentialManagementServer) GetCredential(context.Context, *GetCredentialRequest) (*GetCredentialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCredential not implemented") +} +func (UnimplementedCredentialManagementServer) mustEmbedUnimplementedCredentialManagementServer() {} + +// UnsafeCredentialManagementServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CredentialManagementServer will +// result in compilation errors. +type UnsafeCredentialManagementServer interface { + mustEmbedUnimplementedCredentialManagementServer() +} + +func RegisterCredentialManagementServer(s grpc.ServiceRegistrar, srv CredentialManagementServer) { + s.RegisterService(&CredentialManagement_ServiceDesc, srv) +} + +func _CredentialManagement_GetCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCredentialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CredentialManagementServer).GetCredential(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zenoss.cloud.credentials.CredentialManagement/GetCredential", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CredentialManagementServer).GetCredential(ctx, req.(*GetCredentialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CredentialManagement_ServiceDesc is the grpc.ServiceDesc for CredentialManagement service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CredentialManagement_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "zenoss.cloud.credentials.CredentialManagement", + HandlerType: (*CredentialManagementServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCredential", + Handler: _CredentialManagement_GetCredential_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "zenoss/cloud/credentials.proto", +} diff --git a/go/cloud/credentials/mock_CredentialManagementClient.go b/go/cloud/credentials/mock_CredentialManagementClient.go new file mode 100644 index 0000000..2f935f9 --- /dev/null +++ b/go/cloud/credentials/mock_CredentialManagementClient.go @@ -0,0 +1,101 @@ +// Code generated by mockery v2.14.0. DO NOT EDIT. + +package credentials + +import ( + context "context" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" +) + +// MockCredentialManagementClient is an autogenerated mock type for the CredentialManagementClient type +type MockCredentialManagementClient struct { + mock.Mock +} + +type MockCredentialManagementClient_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCredentialManagementClient) EXPECT() *MockCredentialManagementClient_Expecter { + return &MockCredentialManagementClient_Expecter{mock: &_m.Mock} +} + +// GetCredential provides a mock function with given fields: ctx, in, opts +func (_m *MockCredentialManagementClient) GetCredential(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption) (*GetCredentialResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *GetCredentialResponse + if rf, ok := ret.Get(0).(func(context.Context, *GetCredentialRequest, ...grpc.CallOption) *GetCredentialResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetCredentialResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *GetCredentialRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCredentialManagementClient_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' +type MockCredentialManagementClient_GetCredential_Call struct { + *mock.Call +} + +// GetCredential is a helper method to define mock.On call +// - ctx context.Context +// - in *GetCredentialRequest +// - opts ...grpc.CallOption +func (_e *MockCredentialManagementClient_Expecter) GetCredential(ctx interface{}, in interface{}, opts ...interface{}) *MockCredentialManagementClient_GetCredential_Call { + return &MockCredentialManagementClient_GetCredential_Call{Call: _e.mock.On("GetCredential", + append([]interface{}{ctx, in}, opts...)...)} +} + +func (_c *MockCredentialManagementClient_GetCredential_Call) Run(run func(ctx context.Context, in *GetCredentialRequest, opts ...grpc.CallOption)) *MockCredentialManagementClient_GetCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]grpc.CallOption, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(grpc.CallOption) + } + } + run(args[0].(context.Context), args[1].(*GetCredentialRequest), variadicArgs...) + }) + return _c +} + +func (_c *MockCredentialManagementClient_GetCredential_Call) Return(_a0 *GetCredentialResponse, _a1 error) *MockCredentialManagementClient_GetCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +type mockConstructorTestingTNewMockCredentialManagementClient interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockCredentialManagementClient creates a new instance of MockCredentialManagementClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockCredentialManagementClient(t mockConstructorTestingTNewMockCredentialManagementClient) *MockCredentialManagementClient { + mock := &MockCredentialManagementClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/go/cloud/credentials/mock_CredentialManagementServer.go b/go/cloud/credentials/mock_CredentialManagementServer.go new file mode 100644 index 0000000..442e859 --- /dev/null +++ b/go/cloud/credentials/mock_CredentialManagementServer.go @@ -0,0 +1,111 @@ +// Code generated by mockery v2.14.0. DO NOT EDIT. + +package credentials + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// MockCredentialManagementServer is an autogenerated mock type for the CredentialManagementServer type +type MockCredentialManagementServer struct { + mock.Mock +} + +type MockCredentialManagementServer_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCredentialManagementServer) EXPECT() *MockCredentialManagementServer_Expecter { + return &MockCredentialManagementServer_Expecter{mock: &_m.Mock} +} + +// GetCredential provides a mock function with given fields: _a0, _a1 +func (_m *MockCredentialManagementServer) GetCredential(_a0 context.Context, _a1 *GetCredentialRequest) (*GetCredentialResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *GetCredentialResponse + if rf, ok := ret.Get(0).(func(context.Context, *GetCredentialRequest) *GetCredentialResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*GetCredentialResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *GetCredentialRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockCredentialManagementServer_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' +type MockCredentialManagementServer_GetCredential_Call struct { + *mock.Call +} + +// GetCredential is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 *GetCredentialRequest +func (_e *MockCredentialManagementServer_Expecter) GetCredential(_a0 interface{}, _a1 interface{}) *MockCredentialManagementServer_GetCredential_Call { + return &MockCredentialManagementServer_GetCredential_Call{Call: _e.mock.On("GetCredential", _a0, _a1)} +} + +func (_c *MockCredentialManagementServer_GetCredential_Call) Run(run func(_a0 context.Context, _a1 *GetCredentialRequest)) *MockCredentialManagementServer_GetCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*GetCredentialRequest)) + }) + return _c +} + +func (_c *MockCredentialManagementServer_GetCredential_Call) Return(_a0 *GetCredentialResponse, _a1 error) *MockCredentialManagementServer_GetCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +// mustEmbedUnimplementedCredentialManagementServer provides a mock function with given fields: +func (_m *MockCredentialManagementServer) mustEmbedUnimplementedCredentialManagementServer() { + _m.Called() +} + +// MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedCredentialManagementServer' +type MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedCredentialManagementServer is a helper method to define mock.On call +func (_e *MockCredentialManagementServer_Expecter) mustEmbedUnimplementedCredentialManagementServer() *MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + return &MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call{Call: _e.mock.On("mustEmbedUnimplementedCredentialManagementServer")} +} + +func (_c *MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call) Run(run func()) *MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call) Return() *MockCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + _c.Call.Return() + return _c +} + +type mockConstructorTestingTNewMockCredentialManagementServer interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockCredentialManagementServer creates a new instance of MockCredentialManagementServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockCredentialManagementServer(t mockConstructorTestingTNewMockCredentialManagementServer) *MockCredentialManagementServer { + mock := &MockCredentialManagementServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/go/cloud/credentials/mock_UnsafeCredentialManagementServer.go b/go/cloud/credentials/mock_UnsafeCredentialManagementServer.go new file mode 100644 index 0000000..b87eae9 --- /dev/null +++ b/go/cloud/credentials/mock_UnsafeCredentialManagementServer.go @@ -0,0 +1,60 @@ +// Code generated by mockery v2.14.0. DO NOT EDIT. + +package credentials + +import mock "github.com/stretchr/testify/mock" + +// MockUnsafeCredentialManagementServer is an autogenerated mock type for the UnsafeCredentialManagementServer type +type MockUnsafeCredentialManagementServer struct { + mock.Mock +} + +type MockUnsafeCredentialManagementServer_Expecter struct { + mock *mock.Mock +} + +func (_m *MockUnsafeCredentialManagementServer) EXPECT() *MockUnsafeCredentialManagementServer_Expecter { + return &MockUnsafeCredentialManagementServer_Expecter{mock: &_m.Mock} +} + +// mustEmbedUnimplementedCredentialManagementServer provides a mock function with given fields: +func (_m *MockUnsafeCredentialManagementServer) mustEmbedUnimplementedCredentialManagementServer() { + _m.Called() +} + +// MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'mustEmbedUnimplementedCredentialManagementServer' +type MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call struct { + *mock.Call +} + +// mustEmbedUnimplementedCredentialManagementServer is a helper method to define mock.On call +func (_e *MockUnsafeCredentialManagementServer_Expecter) mustEmbedUnimplementedCredentialManagementServer() *MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + return &MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call{Call: _e.mock.On("mustEmbedUnimplementedCredentialManagementServer")} +} + +func (_c *MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call) Run(run func()) *MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call) Return() *MockUnsafeCredentialManagementServer_mustEmbedUnimplementedCredentialManagementServer_Call { + _c.Call.Return() + return _c +} + +type mockConstructorTestingTNewMockUnsafeCredentialManagementServer interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockUnsafeCredentialManagementServer creates a new instance of MockUnsafeCredentialManagementServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockUnsafeCredentialManagementServer(t mockConstructorTestingTNewMockUnsafeCredentialManagementServer) *MockUnsafeCredentialManagementServer { + mock := &MockUnsafeCredentialManagementServer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/Credential.java b/java/src/main/java/org/zenoss/cloud/credentials/Credential.java new file mode 100644 index 0000000..289316d --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/Credential.java @@ -0,0 +1,1003 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +/** + * Protobuf type {@code zenoss.cloud.credentials.Credential} + */ +public final class Credential extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:zenoss.cloud.credentials.Credential) + CredentialOrBuilder { +private static final long serialVersionUID = 0L; + // Use Credential.newBuilder() to construct. + private Credential(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Credential() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Credential(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetSecrets(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.Credential.class, org.zenoss.cloud.credentials.Credential.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFO_FIELD_NUMBER = 2; + private org.zenoss.cloud.credentials.Info info_; + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + @java.lang.Override + public boolean hasInfo() { + return info_ != null; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return The info. + */ + @java.lang.Override + public org.zenoss.cloud.credentials.Info getInfo() { + return info_ == null ? org.zenoss.cloud.credentials.Info.getDefaultInstance() : info_; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + @java.lang.Override + public org.zenoss.cloud.credentials.InfoOrBuilder getInfoOrBuilder() { + return getInfo(); + } + + public static final int SECRETS_FIELD_NUMBER = 3; + private static final class SecretsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> secrets_; + private com.google.protobuf.MapField + internalGetSecrets() { + if (secrets_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecretsDefaultEntryHolder.defaultEntry); + } + return secrets_; + } + + public int getSecretsCount() { + return internalGetSecrets().getMap().size(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + @java.lang.Override + public boolean containsSecrets( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecrets().getMap().containsKey(key); + } + /** + * Use {@link #getSecretsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecrets() { + return getSecretsMap(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.util.Map getSecretsMap() { + return internalGetSecrets().getMap(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.lang.String getSecretsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecrets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.lang.String getSecretsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecrets().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (info_ != null) { + output.writeMessage(2, getInfo()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSecrets(), + SecretsDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (info_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getInfo()); + } + for (java.util.Map.Entry entry + : internalGetSecrets().getMap().entrySet()) { + com.google.protobuf.MapEntry + secrets__ = SecretsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, secrets__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.zenoss.cloud.credentials.Credential)) { + return super.equals(obj); + } + org.zenoss.cloud.credentials.Credential other = (org.zenoss.cloud.credentials.Credential) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasInfo() != other.hasInfo()) return false; + if (hasInfo()) { + if (!getInfo() + .equals(other.getInfo())) return false; + } + if (!internalGetSecrets().equals( + other.internalGetSecrets())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasInfo()) { + hash = (37 * hash) + INFO_FIELD_NUMBER; + hash = (53 * hash) + getInfo().hashCode(); + } + if (!internalGetSecrets().getMap().isEmpty()) { + hash = (37 * hash) + SECRETS_FIELD_NUMBER; + hash = (53 * hash) + internalGetSecrets().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.zenoss.cloud.credentials.Credential parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Credential parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Credential parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Credential parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Credential parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Credential parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.zenoss.cloud.credentials.Credential prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code zenoss.cloud.credentials.Credential} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:zenoss.cloud.credentials.Credential) + org.zenoss.cloud.credentials.CredentialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 3: + return internalGetSecrets(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 3: + return internalGetMutableSecrets(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.Credential.class, org.zenoss.cloud.credentials.Credential.Builder.class); + } + + // Construct using org.zenoss.cloud.credentials.Credential.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + if (infoBuilder_ == null) { + info_ = null; + } else { + info_ = null; + infoBuilder_ = null; + } + internalGetMutableSecrets().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Credential_descriptor; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Credential getDefaultInstanceForType() { + return org.zenoss.cloud.credentials.Credential.getDefaultInstance(); + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Credential build() { + org.zenoss.cloud.credentials.Credential result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Credential buildPartial() { + org.zenoss.cloud.credentials.Credential result = new org.zenoss.cloud.credentials.Credential(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + if (infoBuilder_ == null) { + result.info_ = info_; + } else { + result.info_ = infoBuilder_.build(); + } + result.secrets_ = internalGetSecrets(); + result.secrets_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.zenoss.cloud.credentials.Credential) { + return mergeFrom((org.zenoss.cloud.credentials.Credential)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.zenoss.cloud.credentials.Credential other) { + if (other == org.zenoss.cloud.credentials.Credential.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.hasInfo()) { + mergeInfo(other.getInfo()); + } + internalGetMutableSecrets().mergeFrom( + other.internalGetSecrets()); + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getInfoFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + secrets__ = input.readMessage( + SecretsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSecrets().getMutableMap().put( + secrets__.getKey(), secrets__.getValue()); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private org.zenoss.cloud.credentials.Info info_; + private com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Info, org.zenoss.cloud.credentials.Info.Builder, org.zenoss.cloud.credentials.InfoOrBuilder> infoBuilder_; + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + public boolean hasInfo() { + return infoBuilder_ != null || info_ != null; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return The info. + */ + public org.zenoss.cloud.credentials.Info getInfo() { + if (infoBuilder_ == null) { + return info_ == null ? org.zenoss.cloud.credentials.Info.getDefaultInstance() : info_; + } else { + return infoBuilder_.getMessage(); + } + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo(org.zenoss.cloud.credentials.Info value) { + if (infoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + info_ = value; + onChanged(); + } else { + infoBuilder_.setMessage(value); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public Builder setInfo( + org.zenoss.cloud.credentials.Info.Builder builderForValue) { + if (infoBuilder_ == null) { + info_ = builderForValue.build(); + onChanged(); + } else { + infoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public Builder mergeInfo(org.zenoss.cloud.credentials.Info value) { + if (infoBuilder_ == null) { + if (info_ != null) { + info_ = + org.zenoss.cloud.credentials.Info.newBuilder(info_).mergeFrom(value).buildPartial(); + } else { + info_ = value; + } + onChanged(); + } else { + infoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public Builder clearInfo() { + if (infoBuilder_ == null) { + info_ = null; + onChanged(); + } else { + info_ = null; + infoBuilder_ = null; + } + + return this; + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public org.zenoss.cloud.credentials.Info.Builder getInfoBuilder() { + + onChanged(); + return getInfoFieldBuilder().getBuilder(); + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + public org.zenoss.cloud.credentials.InfoOrBuilder getInfoOrBuilder() { + if (infoBuilder_ != null) { + return infoBuilder_.getMessageOrBuilder(); + } else { + return info_ == null ? + org.zenoss.cloud.credentials.Info.getDefaultInstance() : info_; + } + } + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Info, org.zenoss.cloud.credentials.Info.Builder, org.zenoss.cloud.credentials.InfoOrBuilder> + getInfoFieldBuilder() { + if (infoBuilder_ == null) { + infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Info, org.zenoss.cloud.credentials.Info.Builder, org.zenoss.cloud.credentials.InfoOrBuilder>( + getInfo(), + getParentForChildren(), + isClean()); + info_ = null; + } + return infoBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> secrets_; + private com.google.protobuf.MapField + internalGetSecrets() { + if (secrets_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SecretsDefaultEntryHolder.defaultEntry); + } + return secrets_; + } + private com.google.protobuf.MapField + internalGetMutableSecrets() { + onChanged();; + if (secrets_ == null) { + secrets_ = com.google.protobuf.MapField.newMapField( + SecretsDefaultEntryHolder.defaultEntry); + } + if (!secrets_.isMutable()) { + secrets_ = secrets_.copy(); + } + return secrets_; + } + + public int getSecretsCount() { + return internalGetSecrets().getMap().size(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + @java.lang.Override + public boolean containsSecrets( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSecrets().getMap().containsKey(key); + } + /** + * Use {@link #getSecretsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSecrets() { + return getSecretsMap(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.util.Map getSecretsMap() { + return internalGetSecrets().getMap(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.lang.String getSecretsOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecrets().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + @java.lang.Override + + public java.lang.String getSecretsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetSecrets().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSecrets() { + internalGetMutableSecrets().getMutableMap() + .clear(); + return this; + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + public Builder removeSecrets( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSecrets().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSecrets() { + return internalGetMutableSecrets().getMutableMap(); + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + public Builder putSecrets( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableSecrets().getMutableMap() + .put(key, value); + return this; + } + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + public Builder putAllSecrets( + java.util.Map values) { + internalGetMutableSecrets().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:zenoss.cloud.credentials.Credential) + } + + // @@protoc_insertion_point(class_scope:zenoss.cloud.credentials.Credential) + private static final org.zenoss.cloud.credentials.Credential DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.zenoss.cloud.credentials.Credential(); + } + + public static org.zenoss.cloud.credentials.Credential getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Credential parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Credential getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java/src/main/java/org/zenoss/cloud/credentials/CredentialManagementGrpc.java b/java/src/main/java/org/zenoss/cloud/credentials/CredentialManagementGrpc.java new file mode 100644 index 0000000..6946e20 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/CredentialManagementGrpc.java @@ -0,0 +1,276 @@ +package org.zenoss.cloud.credentials; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: zenoss/cloud/credentials.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class CredentialManagementGrpc { + + private CredentialManagementGrpc() {} + + public static final String SERVICE_NAME = "zenoss.cloud.credentials.CredentialManagement"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetCredentialMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCredential", + requestType = org.zenoss.cloud.credentials.GetCredentialRequest.class, + responseType = org.zenoss.cloud.credentials.GetCredentialResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetCredentialMethod() { + io.grpc.MethodDescriptor getGetCredentialMethod; + if ((getGetCredentialMethod = CredentialManagementGrpc.getGetCredentialMethod) == null) { + synchronized (CredentialManagementGrpc.class) { + if ((getGetCredentialMethod = CredentialManagementGrpc.getGetCredentialMethod) == null) { + CredentialManagementGrpc.getGetCredentialMethod = getGetCredentialMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCredential")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.zenoss.cloud.credentials.GetCredentialRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.zenoss.cloud.credentials.GetCredentialResponse.getDefaultInstance())) + .setSchemaDescriptor(new CredentialManagementMethodDescriptorSupplier("GetCredential")) + .build(); + } + } + } + return getGetCredentialMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static CredentialManagementStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CredentialManagementStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementStub(channel, callOptions); + } + }; + return CredentialManagementStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CredentialManagementBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CredentialManagementBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementBlockingStub(channel, callOptions); + } + }; + return CredentialManagementBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static CredentialManagementFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CredentialManagementFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementFutureStub(channel, callOptions); + } + }; + return CredentialManagementFutureStub.newStub(factory, channel); + } + + /** + */ + public static abstract class CredentialManagementImplBase implements io.grpc.BindableService { + + /** + */ + public void getCredential(org.zenoss.cloud.credentials.GetCredentialRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCredentialMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetCredentialMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.zenoss.cloud.credentials.GetCredentialRequest, + org.zenoss.cloud.credentials.GetCredentialResponse>( + this, METHODID_GET_CREDENTIAL))) + .build(); + } + } + + /** + */ + public static final class CredentialManagementStub extends io.grpc.stub.AbstractAsyncStub { + private CredentialManagementStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CredentialManagementStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementStub(channel, callOptions); + } + + /** + */ + public void getCredential(org.zenoss.cloud.credentials.GetCredentialRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCredentialMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + */ + public static final class CredentialManagementBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private CredentialManagementBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CredentialManagementBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementBlockingStub(channel, callOptions); + } + + /** + */ + public org.zenoss.cloud.credentials.GetCredentialResponse getCredential(org.zenoss.cloud.credentials.GetCredentialRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCredentialMethod(), getCallOptions(), request); + } + } + + /** + */ + public static final class CredentialManagementFutureStub extends io.grpc.stub.AbstractFutureStub { + private CredentialManagementFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CredentialManagementFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CredentialManagementFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getCredential( + org.zenoss.cloud.credentials.GetCredentialRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCredentialMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_CREDENTIAL = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final CredentialManagementImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CredentialManagementImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_CREDENTIAL: + serviceImpl.getCredential((org.zenoss.cloud.credentials.GetCredentialRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class CredentialManagementBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CredentialManagementBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return org.zenoss.cloud.credentials.Credentials.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CredentialManagement"); + } + } + + private static final class CredentialManagementFileDescriptorSupplier + extends CredentialManagementBaseDescriptorSupplier { + CredentialManagementFileDescriptorSupplier() {} + } + + private static final class CredentialManagementMethodDescriptorSupplier + extends CredentialManagementBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CredentialManagementMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CredentialManagementGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CredentialManagementFileDescriptorSupplier()) + .addMethod(getGetCredentialMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/CredentialOrBuilder.java b/java/src/main/java/org/zenoss/cloud/credentials/CredentialOrBuilder.java new file mode 100644 index 0000000..3e4b12e --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/CredentialOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +public interface CredentialOrBuilder extends + // @@protoc_insertion_point(interface_extends:zenoss.cloud.credentials.Credential) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return Whether the info field is set. + */ + boolean hasInfo(); + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + * @return The info. + */ + org.zenoss.cloud.credentials.Info getInfo(); + /** + * .zenoss.cloud.credentials.Info info = 2 [json_name = "info"]; + */ + org.zenoss.cloud.credentials.InfoOrBuilder getInfoOrBuilder(); + + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + int getSecretsCount(); + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + boolean containsSecrets( + java.lang.String key); + /** + * Use {@link #getSecretsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSecrets(); + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + java.util.Map + getSecretsMap(); + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + /* nullable */ +java.lang.String getSecretsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * map<string, string> secrets = 3 [json_name = "secrets"]; + */ + + java.lang.String getSecretsOrThrow( + java.lang.String key); +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/Credentials.java b/java/src/main/java/org/zenoss/cloud/credentials/Credentials.java new file mode 100644 index 0000000..3bfb5aa --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/Credentials.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +public final class Credentials { + private Credentials() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_zenoss_cloud_credentials_Credential_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_zenoss_cloud_credentials_Credential_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_zenoss_cloud_credentials_Info_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_zenoss_cloud_credentials_Info_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_zenoss_cloud_credentials_GetCredentialRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_zenoss_cloud_credentials_GetCredentialResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036zenoss/cloud/credentials.proto\022\030zenoss" + + ".cloud.credentials\032\034google/api/annotatio" + + "ns.proto\032\033google/protobuf/empty.proto\"\331\001" + + "\n\nCredential\022\016\n\002id\030\001 \001(\tR\002id\0222\n\004info\030\002 \001" + + "(\0132\036.zenoss.cloud.credentials.InfoR\004info" + + "\022K\n\007secrets\030\003 \003(\01321.zenoss.cloud.credent" + + "ials.Credential.SecretsEntryR\007secrets\032:\n" + + "\014SecretsEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" + + "\030\002 \001(\tR\005value:\0028\001\"d\n\004Info\022\022\n\004name\030\001 \001(\tR" + + "\004name\022\022\n\004type\030\002 \001(\tR\004type\022 \n\013description" + + "\030\003 \001(\tR\013description\022\022\n\004tags\030\004 \003(\tR\004tags\"" + + "&\n\024GetCredentialRequest\022\016\n\002id\030\001 \001(\tR\002id\"" + + "]\n\025GetCredentialResponse\022D\n\ncredential\030\001" + + " \001(\0132$.zenoss.cloud.credentials.Credenti" + + "alR\ncredential2\247\001\n\024CredentialManagement\022" + + "\216\001\n\rGetCredential\022..zenoss.cloud.credent" + + "ials.GetCredentialRequest\032/.zenoss.cloud" + + ".credentials.GetCredentialResponse\"\034\202\323\344\223" + + "\002\026\022\024/v1/credentials/{id}BY\n\034org.zenoss.c" + + "loud.credentialsP\001Z7github.com/zenoss/ze" + + "noss-protobufs/go/cloud/credentialsb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + }); + internal_static_zenoss_cloud_credentials_Credential_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_zenoss_cloud_credentials_Credential_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_zenoss_cloud_credentials_Credential_descriptor, + new java.lang.String[] { "Id", "Info", "Secrets", }); + internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_descriptor = + internal_static_zenoss_cloud_credentials_Credential_descriptor.getNestedTypes().get(0); + internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_zenoss_cloud_credentials_Credential_SecretsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_zenoss_cloud_credentials_Info_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_zenoss_cloud_credentials_Info_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_zenoss_cloud_credentials_Info_descriptor, + new java.lang.String[] { "Name", "Type", "Description", "Tags", }); + internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_zenoss_cloud_credentials_GetCredentialRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_zenoss_cloud_credentials_GetCredentialResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor, + new java.lang.String[] { "Credential", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequest.java b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequest.java new file mode 100644 index 0000000..7520a92 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequest.java @@ -0,0 +1,538 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +/** + * Protobuf type {@code zenoss.cloud.credentials.GetCredentialRequest} + */ +public final class GetCredentialRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:zenoss.cloud.credentials.GetCredentialRequest) + GetCredentialRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetCredentialRequest.newBuilder() to construct. + private GetCredentialRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetCredentialRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetCredentialRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.GetCredentialRequest.class, org.zenoss.cloud.credentials.GetCredentialRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.zenoss.cloud.credentials.GetCredentialRequest)) { + return super.equals(obj); + } + org.zenoss.cloud.credentials.GetCredentialRequest other = (org.zenoss.cloud.credentials.GetCredentialRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.zenoss.cloud.credentials.GetCredentialRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code zenoss.cloud.credentials.GetCredentialRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:zenoss.cloud.credentials.GetCredentialRequest) + org.zenoss.cloud.credentials.GetCredentialRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.GetCredentialRequest.class, org.zenoss.cloud.credentials.GetCredentialRequest.Builder.class); + } + + // Construct using org.zenoss.cloud.credentials.GetCredentialRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialRequest_descriptor; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialRequest getDefaultInstanceForType() { + return org.zenoss.cloud.credentials.GetCredentialRequest.getDefaultInstance(); + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialRequest build() { + org.zenoss.cloud.credentials.GetCredentialRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialRequest buildPartial() { + org.zenoss.cloud.credentials.GetCredentialRequest result = new org.zenoss.cloud.credentials.GetCredentialRequest(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.zenoss.cloud.credentials.GetCredentialRequest) { + return mergeFrom((org.zenoss.cloud.credentials.GetCredentialRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.zenoss.cloud.credentials.GetCredentialRequest other) { + if (other == org.zenoss.cloud.credentials.GetCredentialRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object id_ = ""; + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:zenoss.cloud.credentials.GetCredentialRequest) + } + + // @@protoc_insertion_point(class_scope:zenoss.cloud.credentials.GetCredentialRequest) + private static final org.zenoss.cloud.credentials.GetCredentialRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.zenoss.cloud.credentials.GetCredentialRequest(); + } + + public static org.zenoss.cloud.credentials.GetCredentialRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCredentialRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequestOrBuilder.java b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequestOrBuilder.java new file mode 100644 index 0000000..dfcd290 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialRequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +public interface GetCredentialRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:zenoss.cloud.credentials.GetCredentialRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponse.java b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponse.java new file mode 100644 index 0000000..fc901f5 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponse.java @@ -0,0 +1,583 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +/** + * Protobuf type {@code zenoss.cloud.credentials.GetCredentialResponse} + */ +public final class GetCredentialResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:zenoss.cloud.credentials.GetCredentialResponse) + GetCredentialResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetCredentialResponse.newBuilder() to construct. + private GetCredentialResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetCredentialResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetCredentialResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.GetCredentialResponse.class, org.zenoss.cloud.credentials.GetCredentialResponse.Builder.class); + } + + public static final int CREDENTIAL_FIELD_NUMBER = 1; + private org.zenoss.cloud.credentials.Credential credential_; + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return Whether the credential field is set. + */ + @java.lang.Override + public boolean hasCredential() { + return credential_ != null; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return The credential. + */ + @java.lang.Override + public org.zenoss.cloud.credentials.Credential getCredential() { + return credential_ == null ? org.zenoss.cloud.credentials.Credential.getDefaultInstance() : credential_; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + @java.lang.Override + public org.zenoss.cloud.credentials.CredentialOrBuilder getCredentialOrBuilder() { + return getCredential(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (credential_ != null) { + output.writeMessage(1, getCredential()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (credential_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCredential()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.zenoss.cloud.credentials.GetCredentialResponse)) { + return super.equals(obj); + } + org.zenoss.cloud.credentials.GetCredentialResponse other = (org.zenoss.cloud.credentials.GetCredentialResponse) obj; + + if (hasCredential() != other.hasCredential()) return false; + if (hasCredential()) { + if (!getCredential() + .equals(other.getCredential())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCredential()) { + hash = (37 * hash) + CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getCredential().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.GetCredentialResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.zenoss.cloud.credentials.GetCredentialResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code zenoss.cloud.credentials.GetCredentialResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:zenoss.cloud.credentials.GetCredentialResponse) + org.zenoss.cloud.credentials.GetCredentialResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.GetCredentialResponse.class, org.zenoss.cloud.credentials.GetCredentialResponse.Builder.class); + } + + // Construct using org.zenoss.cloud.credentials.GetCredentialResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (credentialBuilder_ == null) { + credential_ = null; + } else { + credential_ = null; + credentialBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_GetCredentialResponse_descriptor; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialResponse getDefaultInstanceForType() { + return org.zenoss.cloud.credentials.GetCredentialResponse.getDefaultInstance(); + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialResponse build() { + org.zenoss.cloud.credentials.GetCredentialResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialResponse buildPartial() { + org.zenoss.cloud.credentials.GetCredentialResponse result = new org.zenoss.cloud.credentials.GetCredentialResponse(this); + if (credentialBuilder_ == null) { + result.credential_ = credential_; + } else { + result.credential_ = credentialBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.zenoss.cloud.credentials.GetCredentialResponse) { + return mergeFrom((org.zenoss.cloud.credentials.GetCredentialResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.zenoss.cloud.credentials.GetCredentialResponse other) { + if (other == org.zenoss.cloud.credentials.GetCredentialResponse.getDefaultInstance()) return this; + if (other.hasCredential()) { + mergeCredential(other.getCredential()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCredentialFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private org.zenoss.cloud.credentials.Credential credential_; + private com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Credential, org.zenoss.cloud.credentials.Credential.Builder, org.zenoss.cloud.credentials.CredentialOrBuilder> credentialBuilder_; + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return Whether the credential field is set. + */ + public boolean hasCredential() { + return credentialBuilder_ != null || credential_ != null; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return The credential. + */ + public org.zenoss.cloud.credentials.Credential getCredential() { + if (credentialBuilder_ == null) { + return credential_ == null ? org.zenoss.cloud.credentials.Credential.getDefaultInstance() : credential_; + } else { + return credentialBuilder_.getMessage(); + } + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public Builder setCredential(org.zenoss.cloud.credentials.Credential value) { + if (credentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + credential_ = value; + onChanged(); + } else { + credentialBuilder_.setMessage(value); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public Builder setCredential( + org.zenoss.cloud.credentials.Credential.Builder builderForValue) { + if (credentialBuilder_ == null) { + credential_ = builderForValue.build(); + onChanged(); + } else { + credentialBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public Builder mergeCredential(org.zenoss.cloud.credentials.Credential value) { + if (credentialBuilder_ == null) { + if (credential_ != null) { + credential_ = + org.zenoss.cloud.credentials.Credential.newBuilder(credential_).mergeFrom(value).buildPartial(); + } else { + credential_ = value; + } + onChanged(); + } else { + credentialBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public Builder clearCredential() { + if (credentialBuilder_ == null) { + credential_ = null; + onChanged(); + } else { + credential_ = null; + credentialBuilder_ = null; + } + + return this; + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public org.zenoss.cloud.credentials.Credential.Builder getCredentialBuilder() { + + onChanged(); + return getCredentialFieldBuilder().getBuilder(); + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + public org.zenoss.cloud.credentials.CredentialOrBuilder getCredentialOrBuilder() { + if (credentialBuilder_ != null) { + return credentialBuilder_.getMessageOrBuilder(); + } else { + return credential_ == null ? + org.zenoss.cloud.credentials.Credential.getDefaultInstance() : credential_; + } + } + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Credential, org.zenoss.cloud.credentials.Credential.Builder, org.zenoss.cloud.credentials.CredentialOrBuilder> + getCredentialFieldBuilder() { + if (credentialBuilder_ == null) { + credentialBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + org.zenoss.cloud.credentials.Credential, org.zenoss.cloud.credentials.Credential.Builder, org.zenoss.cloud.credentials.CredentialOrBuilder>( + getCredential(), + getParentForChildren(), + isClean()); + credential_ = null; + } + return credentialBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:zenoss.cloud.credentials.GetCredentialResponse) + } + + // @@protoc_insertion_point(class_scope:zenoss.cloud.credentials.GetCredentialResponse) + private static final org.zenoss.cloud.credentials.GetCredentialResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.zenoss.cloud.credentials.GetCredentialResponse(); + } + + public static org.zenoss.cloud.credentials.GetCredentialResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCredentialResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.GetCredentialResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponseOrBuilder.java b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponseOrBuilder.java new file mode 100644 index 0000000..ab9dcb3 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/GetCredentialResponseOrBuilder.java @@ -0,0 +1,24 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +public interface GetCredentialResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:zenoss.cloud.credentials.GetCredentialResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return Whether the credential field is set. + */ + boolean hasCredential(); + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + * @return The credential. + */ + org.zenoss.cloud.credentials.Credential getCredential(); + /** + * .zenoss.cloud.credentials.Credential credential = 1 [json_name = "credential"]; + */ + org.zenoss.cloud.credentials.CredentialOrBuilder getCredentialOrBuilder(); +} diff --git a/java/src/main/java/org/zenoss/cloud/credentials/Info.java b/java/src/main/java/org/zenoss/cloud/credentials/Info.java new file mode 100644 index 0000000..4753d9e --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/Info.java @@ -0,0 +1,1000 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +/** + * Protobuf type {@code zenoss.cloud.credentials.Info} + */ +public final class Info extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:zenoss.cloud.credentials.Info) + InfoOrBuilder { +private static final long serialVersionUID = 0L; + // Use Info.newBuilder() to construct. + private Info(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Info() { + name_ = ""; + type_ = ""; + description_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Info(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Info_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.Info.class, org.zenoss.cloud.credentials.Info.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object type_; + /** + * string type = 2 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * string description = 3 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList tags_; + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.zenoss.cloud.credentials.Info)) { + return super.equals(obj); + } + org.zenoss.cloud.credentials.Info other = (org.zenoss.cloud.credentials.Info) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getType() + .equals(other.getType())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.zenoss.cloud.credentials.Info parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Info parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Info parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Info parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Info parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.zenoss.cloud.credentials.Info parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.zenoss.cloud.credentials.Info prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code zenoss.cloud.credentials.Info} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:zenoss.cloud.credentials.Info) + org.zenoss.cloud.credentials.InfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Info_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Info_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.zenoss.cloud.credentials.Info.class, org.zenoss.cloud.credentials.Info.Builder.class); + } + + // Construct using org.zenoss.cloud.credentials.Info.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = ""; + + description_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.zenoss.cloud.credentials.Credentials.internal_static_zenoss_cloud_credentials_Info_descriptor; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Info getDefaultInstanceForType() { + return org.zenoss.cloud.credentials.Info.getDefaultInstance(); + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Info build() { + org.zenoss.cloud.credentials.Info result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Info buildPartial() { + org.zenoss.cloud.credentials.Info result = new org.zenoss.cloud.credentials.Info(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.type_ = type_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.zenoss.cloud.credentials.Info) { + return mergeFrom((org.zenoss.cloud.credentials.Info)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.zenoss.cloud.credentials.Info other) { + if (other == org.zenoss.cloud.credentials.Info.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object type_ = ""; + /** + * string type = 2 [json_name = "type"]; + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + public com.google.protobuf.ByteString + getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string type = 2 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * string type = 2 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * string type = 2 [json_name = "type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * string description = 3 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string description = 3 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * string description = 3 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * string description = 3 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:zenoss.cloud.credentials.Info) + } + + // @@protoc_insertion_point(class_scope:zenoss.cloud.credentials.Info) + private static final org.zenoss.cloud.credentials.Info DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.zenoss.cloud.credentials.Info(); + } + + public static org.zenoss.cloud.credentials.Info getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Info parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public org.zenoss.cloud.credentials.Info getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/java/src/main/java/org/zenoss/cloud/credentials/InfoOrBuilder.java b/java/src/main/java/org/zenoss/cloud/credentials/InfoOrBuilder.java new file mode 100644 index 0000000..2a99569 --- /dev/null +++ b/java/src/main/java/org/zenoss/cloud/credentials/InfoOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: zenoss/cloud/credentials.proto + +package org.zenoss.cloud.credentials; + +public interface InfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:zenoss.cloud.credentials.Info) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string type = 2 [json_name = "type"]; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 2 [json_name = "type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * string description = 3 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + * string description = 3 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return A list containing the tags. + */ + java.util.List + getTagsList(); + /** + * repeated string tags = 4 [json_name = "tags"]; + * @return The count of tags. + */ + int getTagsCount(); + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * repeated string tags = 4 [json_name = "tags"]; + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString + getTagsBytes(int index); +} diff --git a/protobufs/zenoss/cloud/credentials.proto b/protobufs/zenoss/cloud/credentials.proto new file mode 100644 index 0000000..a5d2f90 --- /dev/null +++ b/protobufs/zenoss/cloud/credentials.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package zenoss.cloud.credentials; + +import "google/api/annotations.proto"; +import "google/protobuf/empty.proto"; + +option go_package = "github.com/zenoss/zenoss-protobufs/go/cloud/credentials"; +option java_multiple_files = true; +option java_package = "org.zenoss.cloud.credentials"; + +service CredentialManagement { + rpc GetCredential(GetCredentialRequest) returns (GetCredentialResponse) { + option (google.api.http) = { + get: "/v1/credentials/{id}" + }; + } +} + +message Credential { + string id = 1; + Info info = 2; + map secrets = 3; +} + +message Info { + string name = 1; + string type = 2; + string description = 3; + repeated string tags = 4; +} + +message GetCredentialRequest { + string id = 1; +} + +message GetCredentialResponse { + Credential credential = 1; +} diff --git a/python/zenoss/cloud/credentials_pb2.py b/python/zenoss/cloud/credentials_pb2.py new file mode 100644 index 0000000..eeca310 --- /dev/null +++ b/python/zenoss/cloud/credentials_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: zenoss/cloud/credentials.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ezenoss/cloud/credentials.proto\x12\x18zenoss.cloud.credentials\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xd9\x01\n\nCredential\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x32\n\x04info\x18\x02 \x01(\x0b\x32\x1e.zenoss.cloud.credentials.InfoR\x04info\x12K\n\x07secrets\x18\x03 \x03(\x0b\x32\x31.zenoss.cloud.credentials.Credential.SecretsEntryR\x07secrets\x1a:\n\x0cSecretsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"d\n\x04Info\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n\x04type\x18\x02 \x01(\tR\x04type\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04tags\x18\x04 \x03(\tR\x04tags\"&\n\x14GetCredentialRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"]\n\x15GetCredentialResponse\x12\x44\n\ncredential\x18\x01 \x01(\x0b\x32$.zenoss.cloud.credentials.CredentialR\ncredential2\xa7\x01\n\x14\x43redentialManagement\x12\x8e\x01\n\rGetCredential\x12..zenoss.cloud.credentials.GetCredentialRequest\x1a/.zenoss.cloud.credentials.GetCredentialResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/credentials/{id}BY\n\x1corg.zenoss.cloud.credentialsP\x01Z7github.com/zenoss/zenoss-protobufs/go/cloud/credentialsb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'zenoss.cloud.credentials_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\034org.zenoss.cloud.credentialsP\001Z7github.com/zenoss/zenoss-protobufs/go/cloud/credentials' + _CREDENTIAL_SECRETSENTRY._options = None + _CREDENTIAL_SECRETSENTRY._serialized_options = b'8\001' + _CREDENTIALMANAGEMENT.methods_by_name['GetCredential']._options = None + _CREDENTIALMANAGEMENT.methods_by_name['GetCredential']._serialized_options = b'\202\323\344\223\002\026\022\024/v1/credentials/{id}' + _CREDENTIAL._serialized_start=120 + _CREDENTIAL._serialized_end=337 + _CREDENTIAL_SECRETSENTRY._serialized_start=279 + _CREDENTIAL_SECRETSENTRY._serialized_end=337 + _INFO._serialized_start=339 + _INFO._serialized_end=439 + _GETCREDENTIALREQUEST._serialized_start=441 + _GETCREDENTIALREQUEST._serialized_end=479 + _GETCREDENTIALRESPONSE._serialized_start=481 + _GETCREDENTIALRESPONSE._serialized_end=574 + _CREDENTIALMANAGEMENT._serialized_start=577 + _CREDENTIALMANAGEMENT._serialized_end=744 +# @@protoc_insertion_point(module_scope) diff --git a/python/zenoss/cloud/credentials_pb2_grpc.py b/python/zenoss/cloud/credentials_pb2_grpc.py new file mode 100644 index 0000000..a67cc1d --- /dev/null +++ b/python/zenoss/cloud/credentials_pb2_grpc.py @@ -0,0 +1,66 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from zenoss.cloud import credentials_pb2 as zenoss_dot_cloud_dot_credentials__pb2 + + +class CredentialManagementStub(object): + """Missing associated documentation comment in .proto file.""" + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetCredential = channel.unary_unary( + '/zenoss.cloud.credentials.CredentialManagement/GetCredential', + request_serializer=zenoss_dot_cloud_dot_credentials__pb2.GetCredentialRequest.SerializeToString, + response_deserializer=zenoss_dot_cloud_dot_credentials__pb2.GetCredentialResponse.FromString, + ) + + +class CredentialManagementServicer(object): + """Missing associated documentation comment in .proto file.""" + + def GetCredential(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CredentialManagementServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetCredential': grpc.unary_unary_rpc_method_handler( + servicer.GetCredential, + request_deserializer=zenoss_dot_cloud_dot_credentials__pb2.GetCredentialRequest.FromString, + response_serializer=zenoss_dot_cloud_dot_credentials__pb2.GetCredentialResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'zenoss.cloud.credentials.CredentialManagement', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CredentialManagement(object): + """Missing associated documentation comment in .proto file.""" + + @staticmethod + def GetCredential(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/zenoss.cloud.credentials.CredentialManagement/GetCredential', + zenoss_dot_cloud_dot_credentials__pb2.GetCredentialRequest.SerializeToString, + zenoss_dot_cloud_dot_credentials__pb2.GetCredentialResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/python/zenoss/cloud/credentialsmanagement_pb2.py b/python/zenoss/cloud/credentialsmanagement_pb2.py new file mode 100644 index 0000000..d803253 --- /dev/null +++ b/python/zenoss/cloud/credentialsmanagement_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: zenoss/cloud/credentialsmanagement.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(zenoss/cloud/credentialsmanagement.proto\x12\x0czenoss.cloud\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xe7\x01\n\nCredential\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x19\n\x07\x61pi_key\x18\x03 \x01(\tH\x00R\x06\x61piKey\x12\x46\n\x11username_password\x18\x04 \x01(\x0b\x32\x17.zenoss.cloud.CredsPairH\x00R\x10usernamePassword\x12H\n\x12\x63lient_credentials\x18\x05 \x01(\x0b\x32\x17.zenoss.cloud.CredsPairH\x00R\x11\x63lientCredentialsB\x08\n\x06secret\"3\n\tCredsPair\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"&\n\x14GetCredentialRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"Q\n\x15GetCredentialResponse\x12\x38\n\ncredential\x18\x01 \x01(\x0b\x32\x18.zenoss.cloud.CredentialR\ncredential2\x8e\x01\n\x14\x43redentialManagement\x12v\n\rGetCredential\x12\".zenoss.cloud.GetCredentialRequest\x1a#.zenoss.cloud.GetCredentialResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/credentials/{id}Bm\n&org.zenoss.cloud.credentialsManagementP\x01ZAgithub.com/zenoss/zenoss-protobufs/go/cloud/credentialsmanagementb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'zenoss.cloud.credentialsmanagement_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n&org.zenoss.cloud.credentialsManagementP\001ZAgithub.com/zenoss/zenoss-protobufs/go/cloud/credentialsmanagement' + _CREDENTIALMANAGEMENT.methods_by_name['GetCredential']._options = None + _CREDENTIALMANAGEMENT.methods_by_name['GetCredential']._serialized_options = b'\202\323\344\223\002\026\022\024/v1/credentials/{id}' + _CREDENTIAL._serialized_start=118 + _CREDENTIAL._serialized_end=349 + _CREDSPAIR._serialized_start=351 + _CREDSPAIR._serialized_end=402 + _GETCREDENTIALREQUEST._serialized_start=404 + _GETCREDENTIALREQUEST._serialized_end=442 + _GETCREDENTIALRESPONSE._serialized_start=444 + _GETCREDENTIALRESPONSE._serialized_end=525 + _CREDENTIALMANAGEMENT._serialized_start=528 + _CREDENTIALMANAGEMENT._serialized_end=670 +# @@protoc_insertion_point(module_scope)